FS#54814 - [sdcc] sdld segfaults when trying to link any
Attached to Project:
Community Packages
Opened by jem (jem) - Friday, 14 July 2017, 23:06 GMT
Last edited by Kyle Keen (keenerd) - Saturday, 15 September 2018, 02:41 GMT
Opened by jem (jem) - Friday, 14 July 2017, 23:06 GMT
Last edited by Kyle Keen (keenerd) - Saturday, 15 September 2018, 02:41 GMT
|
Details
Description:
The SDCC linker segfaults in libc when trying to link any object files. There's no segfault when using sdcc 3.6.0-3, or using sdcc compiled from upstream sources (svn-#9948) Additional info: sdcc 3.6.0-4 Steps to reproduce: Try to compile a project that has any two *.c files and try to link them. For example sdcc -c a.c sdcc -c main.c sdcc a.rel main.rel -o main.hex Causes the follwing segfault in sdld: sdld[12227]: segfault at ff7c820 ip 00007f1b1da0a8c6 sp 00007ffef70c00b8 error 4 in libc-2.25.so[7f1b1d988000+19d000] |
This task depends upon
Closed by Kyle Keen (keenerd)
Saturday, 15 September 2018, 02:41 GMT
Reason for closing: Fixed
Additional comments about closing: sdcc 3.7.0
Saturday, 15 September 2018, 02:41 GMT
Reason for closing: Fixed
Additional comments about closing: sdcc 3.7.0
The problem is that -std=c99 removes the definition of strdup, so GCC considers that it returns an int and proceeds to strip the topmost 32bits of its result, leading to a crash.
AUR package sigrok-firmware-fx2lafw (https://aur.archlinux.org/packages/sigrok-firmware-fx2lafw) cannot build anymore.
Here is an observation:
With the previous sdcc package (sdcc-3.6.0-3-x86_64.pkg.tar.xz) the builds completes as it should...
But with the latest sdcc package (sdcc-3.6.0-4-x86_64.pkg.tar.xz) the build segfaults in sdld...
https://github.com/zerog2k/stc_diyclock
and I get Segmentation fault.
Downgrading to sdcc-3.6.0-3 also solves the problem.
https://aur.archlinux.org/packages/sdcc/