tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] segfault when using tcc -run on Fedora 21 and 22


From: Dylan Cali
Subject: [Tinycc-devel] segfault when using tcc -run on Fedora 21 and 22
Date: Sat, 9 Jan 2016 15:02:11 -0500

Hey guys,

tcc -run is segfaulting for me, and after inspecting the core dump the
cause is not obvious to me.  I'm not sure if this is a tinycc bug or
something specific to my system.  I'm inclined to think it's something
with tinycc, as I'm experiencing the issue on both Fedora 21 and
Fedora 22.

Here is the relevant output from make test off a fresh clone and build:

dcali-fedora (mob[release_0_9_26-611]=) ~/git/tinycc
$ make test
make: Warning: File 'config.mak' has modification time 0.031 s in the future
make -C tests test 'PROGS_CROSS=i386-tcc i386-win-tcc x86_64-win-tcc
arm-linux-fpa-tcc arm-linux-fpa-ld-tcc arm-linux-gnu-tcc
arm-linux-gnueabi-tcc arm64-tcc c67-tcc arm-win-mingw32ce-tcc'
make[1]: Entering directory '/home/dylan.cali/git/tinycc/tests'
make[1]: Warning: File '../config.mak' has modification time 0.029 s
in the future
------------ hello-exe ------------
../tcc -B.. -I.. -I.. -I../include -L.. ../examples/ex1.c -o hello ||
(../tcc -vv; exit 1) && ./hello
Hello World
------------ hello-run ------------
../tcc -B.. -I.. -I.. -I../include -L.. -run ../examples/ex1.c
Makefile:94: recipe for target 'hello-run' failed
make[1]: *** [hello-run] Segmentation fault
make[1]: Leaving directory '/home/dylan.cali/git/tinycc/tests'
Makefile:377: recipe for target 'test' failed
make: *** [test] Error 2


Inspecting the coredump gives this stack trace:

Core was generated by `../tcc -B.. -I.. -I.. -I../include -L.. -run
../examples/ex1.c'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00000000021da3b0 in ?? ()
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.21-8.fc22.x86_64
(gdb) bt
#0  0x00000000021da3b0 in ?? ()
#1  0x000000000041b5fc in tcc_run (s1=0x21cd010, argc=1,
argv=0x7fff0145ff30) at tccrun.c:143
#2  0x0000000000429553 in main (argc=8, argv=0x7fff0145fef8) at tcc.c:347
(gdb) up
#1  0x000000000041b5fc in tcc_run (s1=0x21cd010, argc=1,
argv=0x7fff0145ff30) at tccrun.c:143
143             ret = (*prog_main)(argc, argv);
(gdb) l
138             bound_exit();
139         } else
140     #endif
141         {
142             errno = 0; /* clean errno value */
143             ret = (*prog_main)(argc, argv);
144         }
145         return ret;
146     }
147
(gdb)


So it is segfaulting when invoking prog_main.  Any idea of the cause?

I've posted my configure and make output here:
https://gist.github.com/calid/28a6db8408ef7f8b3e75

Here is some other relevant system info, let me know if you need anything else:

$ cat /etc/system-release
Fedora release 22 (Twenty Two)

$ uname -a
Linux dcali-fedora 4.2.8-200.fc22.x86_64 #1 SMP Tue Dec 15 16:50:23
UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

$ /lib64/libc.so.6
GNU C Library (GNU libc) stable release version 2.21, by Roland McGrath et al.
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 5.1.1 20150618 (Red Hat 5.1.1-4).
Available extensions:
        The C stubs add-on version 2.1.2.
        crypt add-on version 2.1 by Michael Glad and others
        GNU Libidn by Simon Josefsson
        Native POSIX Threads Library by Ulrich Drepper et al
        BIND-8.2.3-T5B
        RT using linux kernel aio
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.


Thanks much,
Dylan



reply via email to

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