You forgot return value of function.

сб, 3 нояб. 2018 г., 16:50 藍挺瑋 lant...@gmail.com:

> 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
> <http://gnu.org/licenses/gpl.html>
> 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:
> <http://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
>     <http://www.gnu.org/software/gdb/documentation/>.
>
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from tcc...Reading symbols from
> /usr/lib/debug/usr/bin/tcc-0.9.27-1.fc29.x86_64.debug...done.
> done.
> [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
> (s1=s1@entry=0x55e931cb2260, fd=fd@entry=3,
> file_offset=file_offset@entry=0) 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
> (s1=s1@entry=0x55e931cb2260, fd=fd@entry=3,
> file_offset=file_offset@entry=0) 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
> (s=s@entry=0x55e931cb2260, fmt=fmt@entry=0x55e93018c52f "%s/%s",
> filename=filename@entry=0x55e93018c567 "crt1.o", flags=flags@entry=0,
> paths=<optimized out>,
>     nb_paths=<optimized out>) at libtcc.c:1109
> #3  0x000055e930162b17 in tcc_add_crt (s=s@entry=0x55e931cb2260,
> filename=filename@entry=0x55e93018c567 "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.
>
> _______________________________________________
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to