Foating point: tracking change in between gcc 4.4.7 and gcc 4.9.2

Mathieu Malaterre mathieu.malaterre@gmail.com
Thu Dec 10 14:56:00 GMT 2015


On Thu, Dec 10, 2015 at 3:30 PM, Andrew Haley <aph@redhat.com> wrote:
> On 12/10/2015 02:26 PM, Mathieu Malaterre wrote:
>> On Thu, Dec 10, 2015 at 12:08 PM, Mathieu Malaterre
>> <mathieu.malaterre@gmail.com> wrote:
>>>
>>> I am trying to track a change in behavior in between gcc 4.4.7
>>> (CentOS/x86_64) and gcc 4.9.2 (fedora/x86_64). The result of a complex
>>> computation (floating point involved) is slightly different in between
>>> those two.
>>>
>>> Does anyone knows if there was a major change in floating point
>>> computation of std::log, std::pow, std::ceil, std::sqrt or std::exp in
>>> between those versions? My input is a raw binary (no ASCII parsing
>>> involved anywhere in the code). I've compiled code in debug on both
>>> side (only option -g is used nothing else).
>>>
>>> Sorry if this is very broad, I need pointer to get started.
>>
>> Just for reference. I've scp'ed the executable file from CentOS over
>> my fedora installation and it runs as expected. So the issue is within
>> one of the system lib on CentOS (libc/libm/libstdc++6 ?)
>
> So probably not GCC, then.  I'm guessing this is actually glibc.

Is there a way to test that for sure. A naive solution like:

$ LD_PRELOAD=$HOME/libc.so.6 ./mycode

results in

relocation error: /home/mathieu/libc.so.6: symbol _dl_starting_up,
version GLIBC_PRIVATE not defined in file ld-linux-x86-64.so.2 with
link time reference


> Surely, though, minor differences are not unexpected?

True. I simply need to identify the correct location of the issue now.

-- 
Mathieu



More information about the Gcc-help mailing list