FS#70418 - [pacman] new buildflags procude segfaulting binary

Attached to Project: Arch Linux
Opened by Geert Hendrickx (ghen) - Sunday, 11 April 2021, 22:26 GMT
Last edited by Doug Newgard (Scimmia) - Monday, 12 April 2021, 01:12 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To No-one
Architecture x86_64
Severity Critical
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Building https://aur.archlinux.org/packages/kodi-addon-pvr-iptvsimple/ with the new makepkg buildflags from pacman 5.2.2-3 produced a segfaulting binary:

Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007fd76c4b973b in __memmove_avx_unaligned_erms () from /usr/lib/libc.so.6

Rebuilding the same package with the previous buildflags from pacman 5.2.2-2 resulted in a working binary again.

This is a C++ Kodi addon (kodi-addon-pvr-iptvsimple from AUR), but the same issue is probably reproducible with other C++ programs as well.

See (unjustified) upstream bugreport at https://github.com/kodi-pvr/pvr.iptvsimple/issues/507

Additional info:
* package version(s)
pacman 5.2.2-3
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:
Build https://aur.archlinux.org/packages/kodi-addon-pvr-iptvsimple/ (and probably other C++ programs as well) with makepkg buildflags from pacman 5.2.2-3 => segfault
This task depends upon

Closed by  Doug Newgard (Scimmia)
Monday, 12 April 2021, 01:12 GMT
Reason for closing:  Not a bug
Additional comments about closing:  AUR packages are not supported. Just because a compiler flag uncovers a bug doesn't mean it's the flag at fault.
Comment by loqs (loqs) - Sunday, 11 April 2021, 22:44 GMT
Have you been able to determine which flag or combination of flags in particular is causing the SIGSEGV?
For instance does the following cause the issue:
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt \
-Wp,-D_FORTIFY_SOURCE=2,-D_GLIBCXX_ASSERTIONS \
-Wformat -Werror=format-security"
Edit:
Looking at the backtrace try dropping _GLIBCXX_ASSERTIONS first:
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
-Wp,-D_FORTIFY_SOURCE=2 \
-Wformat -Werror=format-security \
-fstack-clash-protection -fcf-protection"

Loading...