Bug 1415021 - By-ref captured polymorphic method causes segfault
Summary: By-ref captured polymorphic method causes segfault
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-20 00:38 UTC by Alex Puchades
Modified: 2017-12-12 10:50 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-12 10:50:24 UTC
Type: Bug


Attachments (Terms of Use)
Preprocessed source (1.61 KB, text/x-csrc)
2017-01-20 00:38 UTC, Alex Puchades
no flags Details

Description Alex Puchades 2017-01-20 00:38:54 UTC
Created attachment 1242641 [details]
Preprocessed source

Description of problem:
Segmentation fault when compiling generic lambda capturing a polymorphic method that depends on type of argument passed.

Version-Release number of selected component (if applicable):
gcc (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)

How reproducible:
Compile the following source file: http://pastebin.com/g2esaPVX

Steps to Reproduce:
1. wget http://pastebin.com/raw/g2esaPVX -O source.cpp
2. g++ -std=c++14 source.cpp -o source

Actual results:
source.cpp: In lambda function:
source.cpp:5:33: internal compiler error: Segmentation fault
                 ([&] (auto x) { foo(x); })(10);
                                 ^~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/cc1XAoUt.out file, please attach this to your bugreport.

Expected results:
(Successful compilation)

Additional info:

Comment 1 Alex Puchades 2017-01-20 00:42:37 UTC
Upstream not notified yet as I couldn't find a similar bug reported and bugzilla account is temporarily disabled.

Comment 2 Marek Polacek 2017-01-20 13:00:21 UTC
This is actually fixed on the trunk.  It was fixed in https://gcc.gnu.org/r244544.

Comment 3 Marek Polacek 2017-01-20 13:09:16 UTC
...which hasn't been backported to gcc-6 and I'm not sure if it's prudent to do so.

Comment 4 Fedora End Of Life 2017-11-16 18:45:51 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 5 Fedora End Of Life 2017-12-12 10:50:24 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.