tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Crash on static function when compiling with -nostdli


From: Ivan Medoedov
Subject: Re: [Tinycc-devel] Crash on static function when compiling with -nostdlib
Date: Wed, 31 Mar 2021 15:31:04 +0300

It would be nice if tcc -v specified the git commit it was built on.

On Wed, Mar 31, 2021 at 10:01 AM Christian Jullien <eligis@orange.fr> wrote:

Hi Oren,

 

Unfortunately, tcc –v does not indicates precisely the version you use.

I can just say that I can’t reproduce with mob. The official 0.9.27 is really old. Please use mod instead.

 

[jullien@fedora64 ~]$ uname -a

Linux fedora64.eligis.com 5.11.10-200.fc33.x86_64 #1 SMP Thu Mar 25 16:51:31 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

[jullien@fedora64 ~]$ cat testcase.c

static void test () {;}

void _start() {;}

[jullien@fedora64 ~]$ tcc testcase.c –nostdlib

[jullien@fedora64 ~]$

 

C.

 

 

 

From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange.fr@nongnu.org] On Behalf Of Oren Watson via Tinycc-devel
Sent: Wednesday, March 31, 2021 07:19
To: tinycc-devel@nongnu.org
Cc: orenwatson@tutanota.com
Subject: [Tinycc-devel] Crash on static function when compiling with -nostdlib

 

the following code, when compiled with tcc -nostdlib caused tcc to segafult

$ cat testcase.c

static void test () {;}
void _start() {;}

$ tcc testcase.c -nostdlib

Segmentation fault (core dumped)

$ tcc -v

tcc version 0.9.27 (x86_64 Linux)

 

I did some variations and it seems it's just any "static" function definition, causes segfault when compiling without standard library.


---

Oren Watson (he/him)

orenwatson@tutanota.com

 

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

reply via email to

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