Skip to content
This repository has been archived by the owner on Sep 28, 2023. It is now read-only.

Crash when building with -D_FORTIFY_SOURCE=2 #157

Closed
Pinkbyte opened this issue Jun 26, 2019 · 1 comment
Closed

Crash when building with -D_FORTIFY_SOURCE=2 #157

Pinkbyte opened this issue Jun 26, 2019 · 1 comment

Comments

@Pinkbyte
Copy link

In Gentoo Linux building with _FORTIFY_SOURCE is the default configuration.

I need to manually add _FORTIFY_SOURCE=0 to build options to prevent 7kaa binary from crashing.

Here is gdb backtrace:

(gdb) run
Starting program: /usr/bin/7kaa
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
*** buffer overflow detected ***: /usr/bin/7kaa terminated

Program received signal SIGABRT, Aborted.
0x00007ffff740fb4b in raise () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff740fb4b in raise () from /lib64/libc.so.6
#1 0x00007ffff73f9535 in abort () from /lib64/libc.so.6
#2 0x00007ffff7455749 in ?? () from /lib64/libc.so.6
#3 0x00007ffff74f0b55 in ?? () from /lib64/libc.so.6
#4 0x00007ffff74f0b91 in __fortify_fail () from /lib64/libc.so.6
#5 0x00007ffff74eece0 in __chk_fail () from /lib64/libc.so.6
#6 0x00007ffff74ee38f in __strcat_chk () from /lib64/libc.so.6
#7 0x000055555556d32a in strcat (__src=0x5555556a52c3 "//TRANSLIT", __dest=0x55555570191a <locale_res+26> "ISO-8859-1//TRANS")
at /usr/include/bits/string_fortified.h:128
#8 LocaleRes::init(char const*) () at LocaleRes.cpp:110
#9 0x000055555556a53a in main (argc=1, argv=0x7fffffffdd38) at AM.cpp:303

@the3dfxdude
Copy link
Owner

Fixed with commit 5f765d8

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants