ports/138481: lang/tcc: tcc compiled executables segfault
| From: | gonebsd <gonebsd@gmail.com> |
| Date: | Wed, 2 Sep 2009 12:33:26 GMT |
| Subject: | lang/tcc: tcc compiled executables segfault |
| Send-pr version: | www-3.1 |
| Number: | 138481 |
| Category: | ports |
| Synopsis: | lang/tcc: tcc compiled executables segfault |
| Severity: | serious |
| Priority: | medium |
| Responsible: | dinoex@FreeBSD.org |
| State: | analyzed |
| Class: | sw-bug |
| Arrival-Date: | Wed Sep 02 12:40:06 UTC 2009 |
| Closed-Date: | |
| Last-Modified: | Sun Sep 06 10:31:16 CEST 2009 |
| Originator: | gonebsd |
| Release: | FreeBSD 7.2-RELEASE-p3 i386 |
| Organization: |
| Environment: |
| Description: |
Every executable compiled using tcc segfaults. Interestingly,
if the "-run" is used, the program executes as expected. See
the "how to repeat the problem" below.
I tried tcc version 0.9.24 (via pkg_add) and 0.9.25 (via ports,
using gcc 4.2.1) with the same results.
This seems to be FreeBSD specific since I cannot reproduce this
on Linux (Arch, with gcc 4.4.1) at all.
if the "-run" is used, the program executes as expected. See
the "how to repeat the problem" below.
I tried tcc version 0.9.24 (via pkg_add) and 0.9.25 (via ports,
using gcc 4.2.1) with the same results.
This seems to be FreeBSD specific since I cannot reproduce this
on Linux (Arch, with gcc 4.4.1) at all.
| How-To-Repeat: |
echo 'main(){puts("hello");}' | tcc -o output - && ./output
Segmentation fault (core dumped)
And with "-run":
echo 'main(){puts("hello");}' | tcc -run -
hello
Segmentation fault (core dumped)
And with "-run":
echo 'main(){puts("hello");}' | tcc -run -
hello
| Fix: |
| Release-Note: |
| Audit-Trail: |
| Responsible Changed | |
| From-To: | freebsd-ports-bugs->dinoex |
| By: | edwin |
| When: | Wed Sep 2 12:40:16 UTC 2009 |
| Why: | Over to maintainer (via the GNATS Auto Assign Tool) |
| State Changed | |
| From-To: | open->analyzed |
| By: | dinoex |
| When: | Sun Sep 6 10:23:02 CEST 2009 |
| Why: | Verfied, the executables are not valid for FreeBSD 6 or FreeBSD 7 even ldd crashes on analyzing the executabe. The problem is known upstream, but no patch availible: http://www.mail-archive.com/tinycc-devel@nongnu.org/msg00129.html --------- Sergey Lyubka Sat, 23 Jul 2005 05:44:45 -0700 tcc builds ELF executable in the way not understood by FreeBSD. There is no quick fix for that, afaik. ELF executable linkage part of tcc must be adopted for building native FreeBSD exe-s. However, building Linux executables and linking them against /usr/compat/linux libraries might work. I spent some time before, trying to make 'native linkage' work on FreeBSD, but not finished the work yet. It is half-way complete. Simple programs do execute, more complex ones coredump. --------- Patches welcome. |
| Unformatted: |
