}
static void
-do_expect_segv (void (*fn)(void *), void *data)
+do_expect_signal (void (*fn)(void *), void *data)
{
struct sigaction sa;
sa.sa_sigaction = segv_handler;
if (sigaction (SIGSEGV, &sa, NULL) == -1)
die ("sigaction failed", errno);
+ if (sigaction (SIGBUS, &sa, NULL) == -1)
+ die ("sigaction failed", errno);
(*fn)(data);
* to exit with success, and return failure otherwise.
*/
static pixman_bool_t
-expect_segv (void (*fn)(void *), void *data)
+expect_signal (void (*fn)(void *), void *data)
{
pid_t pid, wp;
int status;
die ("fork failed", errno);
if (pid == 0)
- do_expect_segv (fn, data); /* never returns */
+ do_expect_signal (fn, data); /* never returns */
wp = waitpid (pid, &status, 0);
if (wp != pid)
{
prinfo ("*(uint8_t *)(%p + %d)", p, offset);
- if (expect_segv (read_u8, p + offset))
+ if (expect_signal (read_u8, p + offset))
{
- prinfo ("\tSEGV OK\n");
+ prinfo ("\tsignal OK\n");
return TRUE;
}
* min_width is only a minimum width for the image. The width is aligned up
* for the row size to be divisible by both page size and pixel size.
*
- * If stride_fence is true, the additional page on each row will be armed
- * to cause SIGSEVG on all accesses. This should catch all accesses outside
- * the valid row pixels.
+ * If stride_fence is true, the additional page on each row will be
+ * armed to cause SIGSEGV or SIGBUS on all accesses. This should catch
+ * all accesses outside the valid row pixels.
*/
pixman_image_t *
fence_image_create_bits (pixman_format_code_t format,