Re: [xml] xml2 2.7.8 + gcc 4.5.2 unpredictable behaviour
- From: Noam Postavsky <npostavs users sourceforge net>
- To: Emanuele Placidi <emanuele placidi gmail com>
- Cc: xml gnome org
- Subject: Re: [xml] xml2 2.7.8 + gcc 4.5.2 unpredictable behaviour
- Date: Wed, 13 Apr 2011 21:11:21 -0400
Emanuele Placidi <emanuele placidi gmail com> writes:
Hi,
ÂI would to point out a strange behaviour when storing in a structure an
xmlChar pointer returned by xmlGetProp().
In attach there is a very simple code which sig faults when compiled with gcc
Well I didn't get a segfault on my machine using gcc 4.5.2 and libxml2
2.7.8, but valgrind did indicate many errors. For instance line 369:
reg=calloc(0,sizeof(struct register_desc));
You are allocating memory for 0 register_desc structs here. If this code
ever worked it was only by accident.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]