Bug 64271 - Executable compiled with gcc 3.1-0.25 segfaults
Executable compiled with gcc 3.1-0.25 segfaults
Status: CLOSED NOTABUG
Product: Red Hat Raw Hide
Classification: Retired
Component: gcc (Show other bugs)
1.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-05-01 04:17 EDT by Peter Klotz
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-05-01 04:18:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Peter Klotz 2002-05-01 04:17:58 EDT
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 07:51:14 EDT
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.