|
Boost : |
Subject: Re: [boost] Debugging optimisation unstable code - Stack and other tools
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2015-01-22 11:28:56
On 22/01/2015 17:17, Fletcher, John P wrote:
>
> ________________________________________
> From: Boost [boost-bounces_at_[hidden]] on behalf of Mathias Gaunard [mathias.gaunard_at_[hidden]]
> Sent: 22 January 2015 15:59
> To: boost_at_[hidden]
> Subject: Re: [boost] Debugging optimisation unstable code - Stack and other tools
>
> On 22/01/2015 15:35, Fletcher, John P wrote:
>>> I am working to get the bugs out of Phoenix and have a situation where some tests are optimisation unstable - they run on Clang 3.5 with -O1 but not -O2 and on gcc 4.9.0 with -O0 but not -O1. The higher optimisation gives an erroneous return value.
>>>
>>> I am looking for tools to work with this.
>
>> You can enable the sanitizers bundled with clang and gcc. You can also
>> try valgrind.
>
> Thank you.
>
> I have been trying the sanitizers (clang version) without success. None report anything and using -fsanitize=undefined caused the error to disappear!
-fsanitize=undefined is pretty basic, you can try enabling the more
advanced sanitizers, like address or memory.
> I want to try making finer grained optimization but have not succeeded yet.
You can try to isolate what optimization pass is causing the problem by
looking at the difference between the different optimization levels and
trying individual flags.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk