tinycc-devel
[Top][All Lists]
Advanced

[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)

Hi,

On Sat, 3 Nov 2018, Christian Jullien wrote:


BTW, I already reported this BUG in the past:

http://lists.nongnu.org/archive/html/tinycc-devel/2017-10/msg00033.html

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.


Ciao,
Michael.


 

 

 

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.

 

C.

 

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
      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
      (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.

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



reply via email to

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