Bug 1630676

Summary: Compiles crash
Product: [Fedora] Fedora Reporter: Tom Bennet <tom-bennet>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: aoliva, davejohansen, dmalcolm, fweimer, jakub, jwakely, law, mpolacek, msebor, nickc
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-20 00:55:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Preprocessed source none

Description Tom Bennet 2018-09-19 04:32:39 UTC
Created attachment 1484569 [details]
Preprocessed source

Description of problem: Attempts to compile (apparently anything) will crash.  Error message requested bug report.


Version-Release number of selected component (if applicable): libstdc++-devel-7.3.1-6.fc27.x86_64


How reproducible: Compile any c++ program.  Hello world will do.


Steps to Reproduce:
1.
2.
3.

Actual results:
[tom@tomslap tmp]$ g++ hello.cpp
In file included from /usr/include/c++/7/iosfwd:40:0,
                 from /usr/include/c++/7/ios:38,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from hello.cpp:1:
/usr/include/c++/7/bits/postypes.h:124:7: internal compiler error: Bus error
       : _M_off(0), _M_state() { }
       ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/cclMI8JP.out file, please attach this to your bugreport.


Expected results:
Correct compile.

Additional info:

[tom@tomslap tmp]$ cat hello.cpp
#include <iostream>
int main(int argc, char **argv)
{
	std::cout << "Hello, world!" << std::endl;
}

Comment 1 Jonathan Wakely 2018-09-19 12:54:07 UTC
This doesn't happen for anybody else using gcc-7.3.1-6.fc27.x86_64 so it suggests a hardware problem or something else wrong on your system.

Comment 2 Marek Polacek 2018-09-19 13:02:58 UTC
Indeed, please run "rpm -V gcc gcc-c++ libstdc++ libstdc++-devel" to see if that is ok.

Comment 3 Tom Bennet 2018-09-19 23:11:43 UTC
(In reply to Marek Polacek from comment #2)
> Indeed, please run "rpm -V gcc gcc-c++ libstdc++ libstdc++-devel" to see if
> that is ok.

I think I had run a verify on libstdc++-devel, since that owns the file in the error message.  But your suggestion reports a fault with /usr/libexec/gcc/x86_64-redhat-linux/7/cc1plus. So, yes, probably a disk problem.  Thank you.

Comment 4 Marek Polacek 2018-09-20 00:55:44 UTC
Alright, closing then.

Comment 5 Jonathan Wakely 2018-09-20 07:58:45 UTC
(In reply to Tom Bennet from comment #3)
> I think I had run a verify on libstdc++-devel, since that owns the file in
> the error message.

A corrupted C++ header should not be able to cause a bus error in the compiler. So it's a problem in the compiler, not the header.

Comment 6 Florian Weimer 2018-09-20 08:14:39 UTC
(In reply to Jonathan Wakely from comment #5)
> (In reply to Tom Bennet from comment #3)
> > I think I had run a verify on libstdc++-devel, since that owns the file in
> > the error message.
> 
> A corrupted C++ header should not be able to cause a bus error in the
> compiler. So it's a problem in the compiler, not the header.

Based on comment 3, the compiler binary (cc1plus) was corrupted.