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

Re: strange SIGSEV


The following code seems to produce SIGSEV only on amd64 platforms (both on
GNU/Linux and on GNU/kFreeBSD).  Anyone has an idea what is the portability
problem here?

There is missing prototype for "char * getfoo();" in test.c.
When added, the first test also passes.

Well, next question would be why the second case passes
even without prototype ...

The difference between 1st and 2nd testcase is location of buf.
In the second case,  it is in main program,
it is mapped bellow 2GB mark - i.e. 0x5009e0.
In the first case, it is in shared library,
it is mapped above 2GB mark - i.e. 0x2aaaaacc1ca0.


Reply to: