PATCH COMMITTED: Fix relro_test when throwing from signal handler fails

Ian Lance Taylor iant@google.com
Mon Jun 9 22:25:00 GMT 2008
The relro_test works by triggering a segmentation violation, catching
it in a signal handler, and having the signal handler throw the
exception back to the test code.  That works with current gcc, but it
doesn't work with older versions of gcc.  I committed this patch so
that the test also passes if throwing from a signal handler winds up
calling terminate.

Ian


2008-06-09  Ian Lance Taylor  <iant@google.com>

	* testsuite/relro_test.cc: Include <cstdio>, <cstdlib>, and
	<exception>.
	(throwing, orig_terminate): New static variables.
	(terminate_handler): New static function.
	(t2): Set terminate handler.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-patch
Size: 1607 bytes
Desc: Fix relro_test when throwing from signal handler fails
URL: <https://sourceware.org/pipermail/binutils/attachments/20080609/0cc9b2c6/attachment.bin>


More information about the Binutils mailing list