Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 282189

Summary: [patch] sys-devel/gcc-4.4.1: produces broken binaries with stdcall tailcalls and -foptimize-sibling-calls
Product: Gentoo Linux Reporter: Sergei Trofimovich (RETIRED) <slyfox>
Component: [OLD] Core systemAssignee: Gentoo Toolchain Maintainers <toolchain>
Severity: normal CC: galtgendo
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: gcc_4.4.1_destroys_tailcall.tar.gz

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]

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:
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]

Upstream committed fix 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.