Bug 64271 - Executable compiled with gcc 3.1-0.25 segfaults
Summary: Executable compiled with gcc 3.1-0.25 segfaults
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: gcc
Version: 1.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-05-01 08:17 UTC by Peter Klotz
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-05-01 08:18:02 UTC
Embargoed:


Attachments (Terms of Use)

Description Peter Klotz 2002-05-01 08:17:58 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0rc1)
Gecko/20020417

Description of problem:
The attached program compiles without warnings under gcc 3.1-0.25 but the
executable segfaults immediately.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.gcc -W -Wall overflow.cpp -o overlflow
2../overflow
3.
	

Actual Results:  Segmentation fault

Expected Results:  An error during compile time about exceeding the maximum size
of local variables.

Additional info:

void f()
{
	int i[3000000];
	i[0]=3;
}

int main(void)
{
	f();
	return 0;
}

Comment 1 Jakub Jelinek 2002-05-01 11:51:14 UTC
Er, what maximum size? It is a runtime thing, how can the compiler even guess
it? Retry your program after ulimit -s 16384 and see how it works...


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