On 12/11/22 09:53, noneofyourbusiness wrote:
on linux [glibc|musl] tcc segfaults at tccdbg.c:1961 when compiling

int foo;
void bar(void) {}

with -c -fcommon -g:

tcc -c -fcommon -g test.c

I have no idea why s1->sections[sh_num] is NULL in this case. s1->sections[0] 
is also NULL, sh_num is 10
I just pushed a fix. The code should have checked for SHN_COMMON section.
This is only a problem with stab debug format.
The dwarf debug format works fine.


_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to