Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322042 - uninitialized template member in edc JUnit resource Templates.h can cause HEAP allocation failure
Summary: uninitialized template member in edc JUnit resource Templates.h can cause HEA...
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-edc (show other bugs)
Version: 7.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Ken Ryall CLA
QA Contact: Ken Ryall CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-07 01:51 EDT by Kirk Beitz CLA
Modified: 2012-05-22 14:44 EDT (History)
2 users (show)

See Also:


Attachments
initializes variable that leads to HEAP allocation failure (698 bytes, patch)
2010-08-07 01:53 EDT, Kirk Beitz CLA
cdtdoug: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kirk Beitz CLA 2010-08-07 01:51:54 EDT
in org.eclipse.cdt.debug.edc.tests, resources/Projects/SimpleCpp/inc/Templates.h contains a Template function that has an uninitialized member that can cause a calculation which results in attempting to allocate a *very* large chunk of heap, and will result in a reported HEAP allocation failure.

this probably hasn't been seen previously, because if the memory associated with that variable is 0 (as is probably often the case) or even just small, the failure wouldn't occur, and any testing using this resource would succed.

the attached Templates.h.patch initializes the variable that leads to this problem.
Comment 1 Kirk Beitz CLA 2010-08-07 01:53:00 EDT
Created attachment 176079 [details]
initializes variable that leads to HEAP allocation failure
Comment 2 Ken Ryall CLA 2010-08-09 01:52:56 EDT
Committed patch to HEAD,
Comment 3 CDT Genie CLA 2010-08-09 02:23:02 EDT
*** cdt cvs genie on behalf of kryall ***
Bug 322042 -  uninitialized template member in edc JUnit resource Templates.h can cause HEAP allocation failure

[*] Templates.h 1.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc.tests/resources/Projects/SimpleCpp/inc/Templates.h?root=Tools_Project&r1=1.1&r2=1.2