Re: -fpack-struct causes SEGV



On Tue, 7 Nov 2000, jean-paul roumian wrote:

> I tried the well-known "orbit-docs" examples (echo server, calculator)
> Everything works ok, but if I compile with -fpack-struct option (I did
> this because I work on sotfware that need this 8-(), without changing
> anything else, the programs
> core dump at startup, with:
> 
> 0x804b90f in CORBAMailServer_getSMTPCounter (_obj=0x80595f8, i2=1,
> ev=0xbffff9e8) at calculator-stubs.c:25
> 25    _cnx = ORBit_object_get_connection(_obj);
> (gdb) print *_cnx
> Cannot access memory at address 0x4c.
> (gdb) print *_obj
> $1 = {parent = {interface = 0x400742a8, is_pseudo_object = 0 '\000',
> refs = 16777216}, orb = 0x40000000, connection = 0x80582,
>   object_id = 0x68000000 <Address 0x68000000 out of bounds>,
> profile_list = 0x50080596, forward_locations = 0x80591,   active_profile
> = 0x0, vepv = 0x0, servant = 0x0}

-fpack-struct packs ALL structs, including ones that involve interfaces
to system libraries. I suggest you use __attribute__((packed)) as needed
instead.

I don't really know what the problem is, to be honest, but if you are
using funky customizations like -fpack-struct, you are on your own. :)
-- Elliot
[ "In a democracy, the government is the people," Milo explained. "We're people,
aren't we? So we might just as well keep the money and eliminate the middleman." ]
							- Catch-22






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]