Closed laomaiweng closed 5 years ago
We changed from compiling with gcc to clang not that long ago.
This seems to be the same segfault as I thought would be solved by this commit: https://github.com/termux/termux-packages/commit/1fbe9f6f17cc7df53d213d5c2f6b35b195b0ed62.
gdb backtrace:
$ gdb --args httpd -h
[...]
(gdb) run
Starting program: /data/data/com.termux/files/usr/bin/applets/httpd -h
Program received signal SIGSEGV, Segmentation fault.
httpd_main (argc=<optimized out>, argv=0xbefffab4) at networking/httpd.c:2633
2633
(gdb) bt
#0 httpd_main (argc=<optimized out>, argv=0xbefffab4) at networking/httpd.c:2633
#1 0x7f55a0e6 in run_applet_no_and_exit (applet_no=55, name=<optimized out>, argv=0xbefffab4) at libbb/appletlib.c:940
#2 0x7f55a182 in run_applet_and_exit (name=0xbefffc0c "httpd", argv=0xbefffab4) at libbb/appletlib.c:958
#3 0x7f55a150 in main (argc=<optimized out>, argv=0xbefffab4) at libbb/appletlib.c:1066
Edit: and line 2633 in httpd.c is where INIT_G(); is done, so it's maybe related to all the other busybox issues we've had, see https://github.com/termux/termux-packages/issues/2488.
I get the following when trying to use Busybox's httpd:
It was working fine a week ago. I can't quite remember but I think the sigsegvs started after upgrading Busybox. Other Busybox utilities that I tested work fine.
Here's my
termux-info
: