Opened 9 years ago

Closed 9 years ago

#744 closed defect (fixed)

Describing memory faults in Darwin

Reported by: gb Owned by: rme
Priority: normal Milestone:
Component: Runtime (threads, GC) Version: trunk
Keywords: Cc:


If we get an unrecoverable memory fault, we try to use the siginfo_t argument to the signal handler to describe the reason for the fault.

On Darwin, we handle exceptions at the Mach level and create the siginfo_t argument ourselves. I think that we do this to make the fault address easier to find, but I don't think that we set other fields in the siginfo_t to meaningful values, so the attempt to describe those fields often gives misleading results.

We should presumably either try harder to initialize the siginfo_t the way that a real SIGBUS or SIGSEGV would, or not trust our ability to describe the fault accurately.

Change History (2)

comment:1 Changed 9 years ago by rme

  • Owner set to rme
  • Status changed from new to assigned

Trying harder to initialize the siginfo_t probably means doing what bsd/dev/i386/unix_signal.c (from the xnu sources) does.

This doesn't seem worthwhile to me; I'll change describe_memfault() so that it doesn't print out potentially misleading garbage on Darwin.

comment:2 Changed 9 years ago by rme

  • Resolution set to fixed
  • Status changed from assigned to closed

fixed in r14291

Note: See TracTickets for help on using tickets.