Immediate SIGSEGV if not run from source dir or inside gdb
|Reported by:||D Gowers||Owned by:||Thomas Bernard|
Steps to reproduce:
# make sure there are no stray files lying around..
sudo rm -r /usr/local/grafx2
git clone https://gitlab.com/GrafX2/grafX2.git
sudo make install
# 'which' should return /usr/local/bin/grafx2-sdl
# should immediately give a message like '“grafx2-sdl” terminated by signal SIGSEGV (Address boundary error)'
gdb $(which grafx2-sdl)
# then type run
# grafx2 runs normally
# quit grafx2
# then quit gdb (enter 'q')
# as with gdb; everything behaves normally
My suspicion is that this is a memory allocation bug related to the recent MAX_PATH_CHARACTERS changes.
Platform etc details:
- sdl versions and so on are still the same as the attachment to issue #111 indicates ( http://pulkomandy.tk/projects/GrafX2/attachment/ticket/111/47-54.png )
- Arch Linux x86_64; Linux 5.0.10-arch1-1-ARCH
- Spectrwm window manager, v 3.2.0 running on Xorg 1.20.4
- Not sdl specific (I tested with API=x11 as well; same result)
- The md5sum of the installed binary is the same as the one in the bin/ directory (so the binaries really are identical)
- Does not depend on working directory... I *guess* this probably means it is dependent mainly on the particular path to the binary..
- Since gdb hides the problem, I'm not sure what else to try. Valgrind?
A working barebones setup:
# start in the top level directory of the grafx2 git clone, and execute this.
cp -a bin/grafx2_sdl /tmp/g
mkdir -p /tmp/share/grafx2/skins
cp -a share/grafx2/skins/*DPaint* /tmp/share/grafx2/skins
# gfx2def.ini is not required, despite the error message. Copying it in to /tmp/share/grafx2 does not effect the result other than removing the error message.
# the same applies to gfx2.png
It's curious that this particular snippet works, but hopefully the fact that it does work is informative somehow.
Change History (13)
comment:12 by , 4 years ago
|Priority:||major → critical|
|Status:||new → accepted|