[Top][All Lists]

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

Re: [Tinycc-devel] TCC segfault on Fedora 29

From: Michael Matz
Subject: Re: [Tinycc-devel] TCC segfault on Fedora 29
Date: Sat, 3 Nov 2018 22:24:12 +0100 (CET)
User-agent: Alpine 2.20 (LSU 67 2015-01-07)


On Sat, 3 Nov 2018, Christian Jullien wrote:

BTW, I already reported this BUG in the past:


I fixed this but that doesn't help the original bug report. It's something specific to Fedora 29' /usr/lib64/crt1.o, so the reporter is probably right that it's the update to glibc 2.28 triggering the bug. As I don't have such a new glibc yet I can't reproduce but will given some time. Alternatively: somebody can send me their /usr/lib64/crt*.o files from a system where the segfault reproduces. It's some unhandled situation with the section headers in that file.





From: Tinycc-devel [mailto:address@hidden
On Behalf Of Christian Jullien
Sent: samedi 3 novembre 2018 16:35
To: address@hidden
Subject: Re: [Tinycc-devel] TCC segfault on Fedora 29


Main is a special case.

While it is declared as returning an int, it is legal for this function and
only for this function, to NOT return. In this case, it is as if it
explicitly returned 0.




From: Tinycc-devel [mailto:address@hidden
On Behalf Of Nikolajs Agafonovs
Sent: samedi 3 novembre 2018 16:28
To: address@hidden
Subject: Re: [Tinycc-devel] TCC segfault on Fedora 29


You forgot return value of function.


сб, 3 нояб. 2018 г., 16:50 藍挺瑋 address@hidden:

      TCC works fine on Fedora 28, but it crashes on Fedora 29. It is
      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
      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
      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 =
      (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
      filename=0x7ffc2cf18c90 "/usr/lib64/crt1.o", flags=64) at
      #2  0x000055e930162967 in tcc_add_library_internal
      (address@hidden, address@hidden "%s/%s",
      address@hidden "crt1.o",
      paths=<optimized out>,
          nb_paths=<optimized out>) at libtcc.c:1109
      #3  0x000055e930162b17 in tcc_add_crt (address@hidden,
      address@hidden "crt1.o") at
      #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
      in Fedora 29. I also tested the latest version from git, and it
      in the same way.

      Tinycc-devel mailing list

reply via email to

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