lkml.org 
[lkml]   [2001]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject2.2.x kernels not filling in siginfo_t.si_addr on SEGV?
Date
Greetings!  Shouldn't a SIGSEGV fill in th si_addr member of the
siginfo_t structure passed to a signal handler? Here is what I see
(on several archs):
=============================================================================
q.c
=============================================================================
#include <stdio.h>
#include <signal.h>

void
nh(int s,siginfo_t *si,void *sc) {
printf("%p\n",si->si_addr);
exit(0);
}

int
main() {

struct sigaction sa;
char c[3];

memset(&sa,0,sizeof(sa));
sa.sa_sigaction=nh;
sa.sa_flags=SA_RESTART|SA_SIGINFO;
sigaction(SIGSEGV,&sa,0);
c[4096]=0;

/* raise(SIGSEGV); */

return 0;

}
=============================================================================
camm@kullervo:~$ cc -g q.c -o q
cc -g q.c -o q
camm@kullervo:~$ ./q
./q
(nil)
=============================================================================
Take care,

--
Camm Maguire camm@enhanced.com
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.022 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site