dynamorio icon indicating copy to clipboard operation
dynamorio copied to clipboard

New tool idea: Signal Handler Checker

Open Desperado17 opened this issue 3 years ago • 3 comments

Greetings,

I don't know if dynamorio already has this, but did you ever consider adding a signal handler checker functionality? That means it detects whether a called signal handler registered with, say,

sighandler_t signal(int signum, sighandler_t handler);

does things it shouldn't like

  • If a signal handler calls c library functions that are not considered async signal safe.
  • If a signal handler leaves registers/memory in an invalid state when it hands back contol to the original thread.

Of course, this is mostly a Linux thing. It would probably help tracking certain errors that are otherwise hard to find due to the non linear program flow.

Desperado17 avatar Feb 25 '22 13:02 Desperado17

So this is a proposal for a new tool built on top of DR. Adding labels.

If you would like to build such a tool and include it in the DR release, we would be happy to look at some pull requests.

derekbruening avatar Mar 01 '22 16:03 derekbruening

Unfortunately, I don't have the capabilities to build something like that I think. I was unsure if this was only meant for proposals or requests too.

Desperado17 avatar Mar 01 '22 18:03 Desperado17

Unfortunately, I don't have the capabilities to build something like that I think. I was unsure if this was only meant for proposals or requests too.

No problem. Another way to help is to document further your proposal here, perhaps detailing some use-cases and high-level design challenges/solutions to make it easier for others to pick this up.

johnfxgalea avatar Mar 11 '22 13:03 johnfxgalea