Bug 59131 - Compiler segfaults while generating code to save local variables in transactional section
Summary: Compiler segfaults while generating code to save local variables in transacti...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.7.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-14 14:14 UTC by Holger Machens
Modified: 2019-06-08 15:24 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2013-11-27 00:00:00


Attachments
Test case to reproduce the bug (466 bytes, text/x-c++src)
2013-11-15 12:55 UTC, Holger Machens
Details
reduced testcase (98 bytes, text/plain)
2014-07-10 08:56 UTC, Patrick Marlier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Machens 2013-11-14 14:14:57 UTC
I've analyzed code generated to save and restore local variables in transactional sections and wrote some tests with very much local variables (exceeding the capacity of the CPU registers). At some point the compiler segfaulted. I've attached the code to allow you to further investigate it.



/usr/bin/g++-4.7 -fgnu-tm -Wall -g -O3 -o gnutm-test compiler-segfaults.c -litm
Comment 1 Paolo Carlini 2013-11-14 23:36:55 UTC
Nothing is attached.
Comment 2 Holger Machens 2013-11-15 12:55:41 UTC
Created attachment 31224 [details]
Test case to reproduce the bug
Comment 3 Aldy Hernandez 2013-11-27 17:13:56 UTC
Confirmed...works in mainline.  Anyone care to bisect this and see which patch fixed the problem?
Comment 4 Aldy Hernandez 2013-11-27 17:18:57 UTC
FWIW, also works on 4.8.
Comment 5 Patrick Marlier 2014-07-10 08:56:55 UTC
Created attachment 33098 [details]
reduced testcase
Comment 6 Patrick Marlier 2014-07-10 11:39:12 UTC
This bug seems to be the same as this one:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52173

Maybe the patch can be backported to 4.7 (hopefully without breaking anything?).
Comment 7 Marek Polacek 2014-07-10 11:42:44 UTC
4.7 branch is already closed.
Comment 8 Marek Polacek 2019-06-08 15:24:33 UTC
Should be fixed.