This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

egcs miscompiling ipfwadm ?


Hello,

	I've run up against a wall trying to figure this out.  I have a
RedHat-5.1 Alphalinux box running egcs-1.0.3a and egcs-2.91.47 (in
/usr/local).  The ipfwadm that was distributed with RedHat was compiled
against egcs-1.0.2.  It, and any copy of ipfwadm I rebuild (with any of
the egcs mentioned here) fails to operate.  The call to setsockopt fails.
However, the ipfwadm distributed with RedHat-5.0 (compiled against
gcc-2.7.2.3) *does* work properly, though it generates an unaligned trap.
I've compared the source from both versions and they are identical.  I have
trouble believing that all versions of egcs would miscompile a simple tool
like ipfwadm.  My *kernel* is built with egcs-1.0.3a and I have no
troubles.  But are there any suggestions you can give me for tracking this
puzzling bug?  Here is the difference in strace:

egcs:
setsockopt(3, IPPROTO_IP321, [0], 96)   = -1 EINVAL (Invalid argument)

gcc-2:
setsockopt(3, IPPROTO_IP321, [0], 112)  = 0

I'm not very crafty with gdb yet, but I'm trying.  Any advice would be
greatly appreciated.

thanks,
-bp
--
B. James Phillippe <bryan@terran.org>
Linux Software Engineer, WGT Inc.
http://earth.terran.org/~bryan



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]