Dear gcc guru,
I'm using gcc 2.95.3 on a 2.4 GHz Xeon with 4GB of ram running
redhat linux with the 2.4.20 and/or 2.4.27 kernel. For the project I'm
working on, I have no choice but to use 2.95.3.
If I create a large structure, then create a pointer to that
structure, then use the pointer to reference areas of the
structure more than 0xfffffff bytes from the beginning of the structure,
I get a seg fault.
In the attached sample code, the "got here 3" prints, but the "got here
4" does not. The line of code between those lines produces the seg
fault.
I know the memory for the structure is getting allocated, and calloc
never fails, so the allocated memory can be written.
Based on what I've seen, I would guess that whatever assembly
language addressing mode is being used has an offset limit of 0xfffffff.
I look forward to any help you may be able to provide.
Thank you very much,
Mark