new release?
Sean Middleditch
elanthis at awesomeplay.com
Fri Apr 22 06:10:24 PDT 2005
On Fri, 2005-04-22 at 00:47 -0400, David Zeuthen wrote:
> where the _dbus_warn lines is added by myself. Obviously these lines
> should print the same thing, yes?, and they do with gcc32. However, with
> gcc4 I get different results
>
> buf='BCDEFGHIJK' 0xbf94840e
> v_string='' 0xbf948400
>
> which really surprises me. Passing CFLAGS="-O1" CXXFLAGS="-O1" to
> configure lets 'make check' pass though :-/. Assuming this is a gcc4
> bug, can we force -O1 for the time being and do a release?
Are you sure v_string isn't being corrupted, perhaps by a buffer
overrun? Try running in Valgrind, or put another declaration between
buf and v_string (like an int foo or something, set it to a magic
number, and check the magic number after you print out the warning
lines). I dare say if this is a GCC 4.0 bug, it might have been caught
by now - code like that is rather common.
I had a similar problem when porting some code to GCC 4.0 because of
accidentally relying on some undefined ordering behavior with the
post-increment operator which changed in GCC 4.0.
>
> Cheers,
> David
>
>
--
Sean Middleditch <elanthis at awesomeplay.com>
More information about the dbus
mailing list