[Top][All Lists]

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

[Tinycc-devel] TCC segfault on Fedora 29

From: 藍挺瑋
Subject: [Tinycc-devel] TCC segfault on Fedora 29
Date: Sat, 3 Nov 2018 21:47:47 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

TCC works fine on Fedora 28, but it crashes on Fedora 29. It is easily
reproducible because it cannot even compile a simple program.

$ echo 'int main(){}' > dummy.c
$ tcc dummy.c
Segmentation fault (core dumped)
$ gdb tcc core.\!usr\!bin\!tcc.signal-11.pid-303
GNU gdb (GDB) Fedora 8.2-3.fc29
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from tcc...Reading symbols from
[New LWP 303]

warning: Loadable section ".note.gnu.property" outside of ELF segments
Core was generated by `tcc dummy.c'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000055e93017e05c in tcc_load_object_file
(address@hidden, address@hidden,
address@hidden) at tccelf.c:2462
2462                s->sh_info = sm_table[sh->sh_info].s->sh_num;
(gdb) bt
#0  0x000055e93017e05c in tcc_load_object_file
(address@hidden, address@hidden,
address@hidden) at tccelf.c:2462
#1  0x000055e93016286c in tcc_add_file_internal (s1=0x55e931cb2260,
filename=0x7ffc2cf18c90 "/usr/lib64/crt1.o", flags=64) at libtcc.c:1028
#2  0x000055e930162967 in tcc_add_library_internal
(address@hidden, address@hidden "%s/%s",
address@hidden "crt1.o", address@hidden,
paths=<optimized out>,
    nb_paths=<optimized out>) at libtcc.c:1109
#3  0x000055e930162b17 in tcc_add_crt (address@hidden,
address@hidden "crt1.o") at libtcc.c:1125
#4  0x000055e930162c7f in tcc_set_output_type (s=0x55e931cb2260,
output_type=2) at libtcc.c:978
#5  0x000055e93015fa4d in main (argc0=2, argv0=0x7ffc2cf19298) at tcc.c:312

I guess it may be related to the Binutils 2.31 and GLIBC 2.28 upgrades
in Fedora 29. I also tested the latest version from git, and it crashed
in the same way.

reply via email to

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