This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Ada: fix potential SEGV when computing traceback on x86


Tested on x86-linux

In the case of i386 support, we were substracting some numbers from
ptr which was not null (check by the STOP_FRAME macro) the resulting pointer
could be equal or below 0 and a segmentation violation signal was raised
under e.g. Windows.
Note that there is no way to reproduce this problem with a small test case.

2004-10-26  Pascal Obry  <obry@gnat.com>

	* tracebak.c (IS_BAD_PTR): Use IsBadCodePtr on Win32 to check for ptr
	validity (process must have read access). Set to 0 in all other cases.
	(STOP_FRAME): Now check for ptr validity to avoid a segmentation
	violation on Win32.
	(VALID_STACK_FRAME): Check for ptr validity on Win32 to avoid a
	segmentation violation.

Attachment: difs.34
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]