Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 282189 - [patch] sys-devel/gcc-4.4.1: produces broken binaries with stdcall tailcalls and -foptimize-sibling-calls
Summary: [patch] sys-devel/gcc-4.4.1: produces broken binaries with stdcall tailcalls ...
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://gcc.gnu.org/PR40718
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-21 11:39 UTC by Sergei Trofimovich (RETIRED)
Modified: 2009-12-04 22:23 UTC (History)
1 user (show)

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


Attachments
gcc_4.4.1_destroys_tailcall.tar.gz (gcc_4.4.1_destroys_tailcall.tar.gz,1.58 KB, application/octet-stream)
2009-08-21 11:42 UTC, Sergei Trofimovich (RETIRED)
Details
pr151030.patch (pr151030.patch,3.10 KB, patch)
2009-08-29 10:31 UTC, Sergei Trofimovich (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich (RETIRED) gentoo-dev 2009-08-21 11:39:42 UTC
After upgrading GCC I tried to build my C++ project and noticed crashing produced binaries. After debugging this issue I located the place gcc
emits invalid code. g++-4.3.4 works correctly. I'm not sure what caused regression: vanilla GCC, or gentoo patches, so I post bug here.

Reproducible: Always

Steps to Reproduce:
1. Unpack .tat.gz from attach
2. make
3. ./show_the_bug

Actual Results:  
the result is SIGSEGV
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2009-08-21 11:42:13 UTC
Created attachment 201854 [details]
gcc_4.4.1_destroys_tailcall.tar.gz

Archive contains source sample, makefile and disassembler dumps for gcc-4.3.4 and gcc-4.4.1 of suspicious file.
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2009-08-21 11:51:30 UTC
Please note I build i386 binaries(-m32) on amd64
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2009-08-22 12:10:46 UTC
Upstream bug entry: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40718
Comment 4 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-08-22 18:42:32 UTC
assigning to maintainers.
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2009-08-29 10:31:41 UTC
Created attachment 202579 [details, diff]
pr151030.patch

Upstream committed fix http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151030 to gcc-4_4 branch.
I got it from svn and stripped ChangeLog entries (they don't apply cleanly).

Fix works for me.
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2009-09-08 16:55:10 UTC
Should I attach gcc .ebuild or something other to make patch hit portage?
Comment 7 Ryan Hill (RETIRED) gentoo-dev 2009-09-10 19:23:18 UTC
nah, we'll get it next time a new patchset is rolled.
Comment 8 Peter Alfredsen (RETIRED) gentoo-dev 2009-10-23 05:53:35 UTC
Assuming fixed in 4.4.2
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2009-12-04 22:23:48 UTC
> Assuming fixed in 4.4.2
Sorry for a delayed response. I confirm - fixed.

Thanks!