On 30/07/2025 21:05, Trupti wrote:
I tried multiple approaches and found that reducing the optimization
level from -O3 to -O2,-O1 does not resolve the segmentation faults.
However, when I removed only the -ffast-math flag (while keeping other
optimizations) from Makefile.am, the program ran consistently without
any segmentation faults.
This seems to indicate that the instability is likely related to the
-ffast-math flag, rather than the optimization level itself.
Interesting! I was not expecting -ffast-math to be the cause of the
trouble.
Attaching a rules file to use clang. (Clang seems to break dwz!)
If you are happy to try this, it would show if the problem is with gcc.
If the build works with clang with -ffast-math enabled,
I will raise a bug against gcc for this.