Bug 654130
Summary: | A small simple program can reliably cause the compiler to crash | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Eric Hopper <eric-bugs2> |
Component: | gcc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 14 | CC: | aravindvijayan224185, brendan.jones.it, jakub |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-12-28 05:03:47 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
Eric Hopper
2010-11-16 23:24:43 UTC
Thank you for the bug report. Unfortunately, without a stack trace from the crash it is impossible to determine what caused the crash. Please see http://fedoraproject.org/wiki/StackTraces for more information about getting a useful stack trace with debugging symbols. Even if you cannot reproduce this crash at will, you can prepare your system now to produce a good stack trace the next time you experience the crash. Thank you. -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers (In reply to comment #1) > Thank you for the bug report. Unfortunately, without a stack trace from the > crash it is impossible to determine what caused the crash. *raises eyebrows* Really now. Do you mean to say that the simple program I provided doesn't crash the compiler for you? It's done it for every version of gcc4 I've tossed its way. I suppose I'll go get a stack trace just to be bureaucratically correct. The c#1 comment doesn't make any sense for the compiler, for the compiler what matters is just a reproduceable (usually preprocessed, but in this case it is not needed) source plus options and gcc version/architecture. /* { dg-do compile } */ /* { dg-options "-O2" } */ #define S1 " " #define S2 S1 S1 S1 S1 S1 S1 S1 S1 S1 S1 #define S3 S2 S2 S2 S2 S2 S2 S2 S2 S2 S2 #define S4 S3 S3 S3 S3 S3 S3 S3 S3 S3 S3 #define S5 S4 S4 S4 S4 S4 S4 S4 S4 S4 S4 #define S6 S5 S5 S5 S5 S5 S5 S5 S5 S5 S5 #define S7 S6 S6 S6 S6 S6 S6 S6 S6 S6 S6 void foo (void) { __builtin_printf (S7 "\n"); } The problem is just that the string literal is temporarily duped using alloca, which for > 10MB strings doesn't work for the default stack limits. You can of course run it with a larger ulimit -s and it will work. (In reply to comment #3) > The problem is just that the string literal is temporarily duped using alloca, > which for > 10MB strings doesn't work for the default stack limits. You can of > course run it with a larger ulimit -s and it will work. Ahh, that makes sense. And it also makes sense why the compiler can't produce a better diagnostic. There's no really good way to handle running out of stack space or even knowing that it happen in C. I was worried that I found some kind of interesting and odd bug that would bite people who were writing programs less pathological than mine. Thank you for your bug report. We are sorry, but the Fedora Project is no longer releasing bug fixes or any other updates for this version of Fedora. This bug will be set to CLOSED:WONTFIX to reflect this, but please reopen it if the problem persists after upgrading to the latest version of Fedora, which is available from: http://fedoraproject.org/get-fedora -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers |