g++ serious bug in Ubuntu Lucid Lynx
Wed Jun 2 16:26:00 GMT 2010
I'm surprised this wasn't the case before. AFAIK, structs with
doubles have been aligned to at least an 8 byte boundary for years.
You may need to write a new reader that knows the layout on disk and
reconstructs the data.
On Wed, Jun 2, 2010 at 9:16 AM, Christian Convey
> Are you sure that's a bug in the legalistic sense? IIRC, C and C++
> don't promise any particular memory layout for structs.
> On Wed, Jun 2, 2010 at 11:53 AM, David R. Doucette
> <email@example.com> wrote:
>> We just installed Lucid Lynx a few days ago, and have hit a fatal flaw with
>> g++ that has forced us to stop the deployment and roll back the systems we
>> Structures in Lucid are now mapping differently than in the past, so we can
>> no longer read our own files! Further, if any files are written by code
>> produced by the new g++, they are corrupted.
>> The problem is that doubles are now being mapped onto a boundary divisible
>> by 8 rather than a boundary divisible by 4, meaning that offsets change and
>> structs get bigger.
>> I've attached a tar file showing the mapping on Jaunty, Karmic, and Lucid to
>> show the change. This is a greatly simplified program that shows the
>> problem, but it's happening in all of our C++ programs.
>> System is Ubuntu 10.4 Lucid Lynx 64 bit.
>> David Doucette
More information about the Gcc-help