Bug 363383 - SIGSEGV of program is kept hidden when executing a C/C++ executable
Summary: SIGSEGV of program is kept hidden when executing a C/C++ executable
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 8.0.2   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-09 15:55 EST by Jeff Johnston CLA
Modified: 2020-09-04 15:24 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Johnston CLA 2011-11-09 15:55:45 EST
The following program when built and run as a local C/C++ executable:

int main()
{
	int *array;
	array = calloc(10,sizeof(int));
	for(int i = 1; i < 10; i++)
	{
		array[i] = i;
	}
	sprintf("%d\n", array[1]);

	return 0;
}

causes a SIGSEGV to occur in the sprintf call.  This is expected for this program.

The problem is that there is nothing in the console to indicate a SIGSEGV has occurred nor is the -1 exit code from the program reported.  The console just says: <terminated> .....

The exit code is present when one switches to the Debug perspective and looks in the Debug View.

If gdb is being used to run the program, perhaps the console could be kept for viewing after and non-zero exit code should perhaps be reported, if not at least optionally.