Re: Getting the way a SIGSEGV append when catching a SIGSEGV from within

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Mon, Mar 27, 2017 at 4:45 PM, none <ytrezq@xxxxxxxxxx> wrote:
> Hello,
> There’s three way to perform an invalid memory access :
> The attempt to execute/jump at an invalid address.
> The attempt to read at an invalid address.
> The attempt to write at an invalid address.
> Determining the execute case with rt_sigaction is easy : the last value of
> eip match the value of the address which caused the segfault.
> But how to know if the SIGSEGV occurred by a read or by a write attempt ? In
> the same time shouldn’t that information belong in the mmu ?

Did you look at the machine specific context of SIGSEGV?
It will give you access to the error code and the trap number.

To unsubscribe from this list: send the line "unsubscribe linux-x86_64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Index of Archives]     [Linux ia64]     [Linux Kernel]     [DCCP]     [Linux ARM]     [Yosemite News]     [Linux SCSI]     [Linux Hams]
  Powered by Linux