Summary: | sys-apps/toybox-0.8.10: fails to compile (,help.hscripts/make.sh: line 266: 785 Segmentation fault (core dumped) "$UNSTRIPPED"/config2help ...) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sam James <sam> |
Component: | Current packages | Assignee: | Patrick Lauer <patrick> |
Status: | CONFIRMED --- | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/landley/toybox/issues/458 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | build.log |
Description
Sam James
2023-09-24 06:18:56 UTC
if I jam HOSTCC="gcc -ggdb3", I get this when running `generated/unstripped/config2help Config.in .config`: Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7f134c5 in ?? () from /usr/lib64/libc.so.6 (gdb) bt #0 0x00007ffff7f134c5 in ?? () from /usr/lib64/libc.so.6 #1 0x00007ffff7e62840 in strndup () from /usr/lib64/libc.so.6 #2 0x00005555555563ac in main (argc=3, argv=0x7fffffffe2d8) at scripts/config2help.c:365 (gdb) possibly slightly more useful from valgrind: ==263576== Invalid read of size 1 ==263576== at 0x4848948: strnlen (vg_replace_strmem.c:464) ==263576== by 0x492C83F: strndup (strndup.c:42) ==263576== by 0x10A3AB: main (config2help.c:365) ==263576== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==263576== ==263576== ==263576== Process terminating with default action of signal 11 (SIGSEGV) ==263576== Access not within mapped region at address 0x0 ==263576== at 0x4848948: strnlen (vg_replace_strmem.c:464) ==263576== by 0x492C83F: strndup (strndup.c:42) ==263576== by 0x10A3AB: main (config2help.c:365) ==263576== If you believe this happened as a result of a stack ==263576== overflow in your program's main thread (unlikely but ==263576== possible), you can try to increase the size of the ==263576== main thread stack using the --main-stacksize= flag. ==263576== The main thread stack size used in this run was 8388608. from asan/ubsan (probably the most helpful, as you get the naughtiness immediately rather than when it tries to read later on): ``` # HOSTCC="gcc -ggdb3 -fsanitize=address,undefined" make scripts/genconfig.sh scripts/make.sh Library probe generated/{Config.in,newtoys.h,flags.h,globals.h,tags.h+ hostcomp config2help + '[' '!' -f generated/unstripped/config2help ']' + do_loudly gcc -ggdb3 -fsanitize=address,undefined scripts/config2help.c -o generated/unstripped/config2help + '[' -n '' ']' + echo -n '' + gcc -ggdb3 -fsanitize=address,undefined scripts/config2help.c -o generated/unstripped/config2help + isnewer help.h generated/Config.in + '[' -e generated/help.h ']' + echo -n ,help.h ,help.h+ DIDNEWER=, + generated/unstripped/config2help Config.in .config scripts/config2help.c:365:16: runtime error: null pointer passed as argument 1, which is declared to never be null #0 0x55655c3a6fc5 in main scripts/config2help.c:365 #1 0x7efe996f2346 (/usr/lib64/libc.so.6+0x24346) #2 0x7efe996f2408 in __libc_start_main (/usr/lib64/libc.so.6+0x24408) #3 0x55655c3a2604 in _start (/var/tmp/portage/sys-apps/toybox-0.8.10/work/toybox-0.8.10/generated/unstripped/config2help+0xc604) + exit 1 make: *** [Makefile:17: toybox] Error 1 ``` |