Bug#1067907: flam3-genome segfaults on ppc64el with -ffast-math enabled

Peter Blackman <[email protected]>
Newsgroups gmane.linux.debian.devel.bugs.general,gmane.linux.debian.ports.powerpc
Message-ID <[email protected]>
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.

Cheers,
Peter
rules (text/plain, 562 B)
#!/usr/bin/make -f

export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS  = hardening=+all
export DEB_CFLAGS_MAINT_APPEND  = -Wall
export DEB_LDFLAGS_MAINT_APPEND = -lm

%:
	dh $@

# Build library as shared
override_dh_auto_configure:
	dh_auto_configure -- CC=clang --enable-shared --disable-static

# dwz breaks build with clang!
override_dh_dwz:

# Remove execute permission from vidres.flam3
# Drop static library
override_dh_install:
	chmod -R a-x vidres.flam3
	dh_install -Xlibflam3.a

# rect.c not needed anywhere
override_dh_missing:
	dh_missing -Xrect.c
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.