[lkml]   [2001]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectAW: Questionable SIGSEGV signal handling bug concerning siginfo.si_addr on i386-linux 2.4.2
Dear Brian,

it is hard to admit, but you are right even if a structure was not directly
involved. The corresponding high level statements were

double guarded_log( double *arg ) {
try {
return log( *arg ); // e.g. arg==0 or arg==0x1234.
} catch ( s2e::SCN(SIGSGEV)*e ) {
// [...]
} catch ( s2e::SCN(SIGFPE)*e ) {
// [...]

... but your supposed structure access is really there - because a double
value allocates 8 bytes and the gcc-3.0 developers obviously changed code
generation. They access at least FPU parameters now differently and highest
long-word first; that explains the difference in program behavior. Your
suggestion of testing against the whole occupied address range is the
general solution which I already used intuitively if I was dealing with
structs and arrays - but I did not realize that also a double value is a
certain kind of struct if seen from the processor?s point of view, which is
(at the time of writing usually) only 32 bits wide.

Thank you for your exact analysis and your quick response.

Hugo Mildenberger

>Von: Brian Gerst []
>What you are seeing is the correct behavior. The address in si_addr is
>the exact address that caused the page fault (from register %cr2). It
>appears that you were trying to access an element of a structure, where
>the structure pointer was in %eax and the offset of the element within
>the structure is 4 bytes. I suggest that if you are trying to find out
>if a fault happened inside a structure you check the whole range of
>addresses in that structure, because any of them could have faulted.
> Brian Gerst

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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