tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] tcc segfault when using -g and -fcommon


From: Herman ten Brugge
Subject: Re: [Tinycc-devel] tcc segfault when using -g and -fcommon
Date: Sun, 11 Dec 2022 15:43:21 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]