Bug 59731
Summary: | gcc Segmentation faults compiling a simple program | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Mike McClintock <mctock> |
Component: | gcc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED WONTFIX | QA Contact: | Brian Brock <bbrock> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.2 | CC: | martin |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i586 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-10-02 19:28:37 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Mike McClintock
2002-02-12 08:16:19 UTC
Cannot reproduce this with either gcc-2.96-98 nor gcc3-3.0.1-3, both on the exact example given above (with bad spelling) and after fixing it so that it can actually compile. What exact compiler version are you seeing this with and with what exact options? I just bought the workstation verison of RedHat 7.2. gcc -v shows me that it's version: 2.96 20000731 (Red Hat Linux 7.1.2.96.98) I'm trying to compile Apache and got this segment fault on the first file. I reduced the that file down the the .c above to make it easy on you. There are no options, just type: gcc <.c filename> That "while" statement is confusing it and causing gcc to throw the segmentation fault. The file won't link, of course, but it's not even getting near that stage. If it works for you, which I expect it would or any C/C++ compiler, then I'm probably missing something in my installation, like a shared library. I'm hoping you've seen similiar problems like this before and can point me in the right direction, else I won't be able to do develment work on this machine. Thanks What I was wondering if you really were using parce (with c) once and parse (with s) the other time. But as I said, I cannot reproduce this in either case on two different machines. gcc uses no special libs, just libc, so no missing library could cause this. Are you actually able to compile anything non-trivial on this box (say kernel or some other project)? Random gcc failures in 99.9% cases mean bad hardware (well, maybe more, I haven't ever seen a non-reproduceable gcc failure which wasn't caused by faulty hardware). Would you mind if I gave you an account on my system and let you telnet in? I'll set up the test for you and you can do what you want. I just installed this system, so there's nothing worth a hacker's time. I can tell I'm lossing you. Last question, Can you give me a hint? Memory? Motherboard? Disk? X is running, the network is running ok too. Everything seems to be running ok on this bad hardware. I have the exact same problem when compiling the kernel on my Redhat 7.2 system. It's a pure system - I have not installed any other software packages. The segmentation fault occurs while compiling "floppy.c". I'm quite sure it's not a hardware problem for the following reasons: 1) My system is *very* stable (have never been overclocked, everything within specs.) 2) I don't have problems with any other software. 3) The error occurs the exact same place every time I try to recompile the kernel. Hardware errors seem to occur on a semi-random basis, so it seems more like a software problem to me. I've tried to find a solution in the errata section, but none of the fixes there seem to be related to this. I too get seg faults when compiling the kernel with gcc (2.4.18 in my case) when I get to the make bzImage stage.... floppy.c: In function `format_interrupt': floppy.c:2163: Internal error: Segmentation fault. Same file, same function, same line # each time. Hardware appears to be fine with everything else though. :( Will attempt with kgcc and see what happens. I am consistently getting the same segmentation fault error when compiling ardour, an audio editing/mixing program. Source code is at http://ardour.sourceforge.net and is downloadable via cvs. The error seems to happen at various places; see the output of make below: /root/ardour/libs/gtkmm/src/gtk--/label.h:74: internal error: Segmentation fault ---- And on the next run: In file included from /root/ardour/libs/gtkmm/src/gtk--.h:96, from /root/ardour/libs/gtkmmext/gtkmmext/gtk_ui.h:27, from connection_editor.cc:21: /root/ardour/libs/gtkmm/src/gtk--/eventbox.h:69: internal error: Segmentation fault ---- Next time: /usr/include/c++/3.2/bits/stl_list.h: In member function `size_t std::list<_Tp, _Alloc>::size() const [with _Tp = LADSPA::Info*, _Alloc = std::allocator<LADSPA::Info*>]': plugin_manager.cc:111: instantiated from here /usr/include/c++/3.2/bits/stl_list.h:401: internal error: Segmentation fault This is on a working system, no bad hardware, just upgraded to RH 8.0 from 7.3. Closing as a compendium of unrelated non-reproducable segvs. |