Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Nevertheless, we use printf() here as a simple way of
showing that the handler was called. */
- printf("Got SIGSEGV at address: %#lx\en",
- (long) si\->si_addr);
+ printf("Got SIGSEGV at address: %p\en", si\->si_addr);
exit(EXIT_FAILURE);
}
if (buffer == NULL)
handle_error("memalign");
- printf("Start of region: %#lx\en", (long) buffer);
+ printf("Start of region: %p\en", buffer);
if (mprotect(buffer + pagesize * 2, pagesize,
PROT_READ) == \-1)