Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 178168 - dev-lang/tcc-0.9.23-r1 crashes on NX-bit enabled CPU (patch attached)
Summary: dev-lang/tcc-0.9.23-r1 crashes on NX-bit enabled CPU (patch attached)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Maintainers for Miscelleneous Language Packages [OBSOLETE]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-12 10:46 UTC by Joël
Modified: 2007-05-12 11:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Upstream patch (successfully tested on x86 with NX bit enabled) (tcc-0.9.23-NXbit.patch,2.11 KB, patch)
2007-05-12 10:50 UTC, Joël
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joël 2007-05-12 10:46:27 UTC
tcc 0.9.23-r1 will crash when invoked with the "-run" switch on a NX-bit enabled CPU.

Upstream fix is in CVS:
http://cvs.savannah.nongnu.org/viewcvs/tinycc/tcc.c?root=tinycc&r1=1.172&r2=1.173&makepatch=1&diff_format=u


Reproducible: Always

Steps to Reproduce:
1. echo -e '#!/usr/bin/tcc -run\nvoid main(){}' > test.c
2. chmod +x test.c
3. ./test.c

Actual Results:  
tcc segfaults because it doesn't mark executable pages with PROT_EXEC
Comment 1 Joël 2007-05-12 10:50:18 UTC
Created attachment 118979 [details, diff]
Upstream patch (successfully tested on x86 with NX bit enabled)

To test this patch, simply add to src_unpack():
epatch "${FILESDIR}"/${P}-NXbit.patch
Comment 2 Harald van Dijk (RETIRED) gentoo-dev 2007-05-12 11:32:31 UTC
Thanks for the report and the patch. I've added this to the ebuild for 0.9.23-r1 (without a revbump).