Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add client event for client or DR fault #50

Open
derekbruening opened this issue Nov 27, 2014 · 4 comments
Open

add client event for client or DR fault #50

derekbruening opened this issue Nov 27, 2014 · 4 comments

Comments

@derekbruening
Copy link
Contributor

From derek.br...@gmail.com on February 24, 2009 14:35:01

this was PR 200414

we'll want to add an event for faults occurring in DR or client code so that
a tool can report such failures in a customized way or try to recover from
client faults.

note we still don't have a good plan for SEH across client/DR boundary -
e.g. when a client passed a NULL pointer to a DR routine we'll currently
take the blame

we already provide dr_safe_{read,write}.
xref issue #51 /PR 198875 on adding try/except.

we already provide an exception event on Windows and a signal event on
Linux (PR 304708) for application faults (both of which do not handle
faults in DR or a client, deferring to this case).

Original issue: http://code.google.com/p/dynamorio/issues/detail?id=50

@derekbruening
Copy link
Contributor Author

From bruen...@google.com on August 28, 2014 07:16:41

Owner: ---

@derekbruening
Copy link
Contributor Author

derekbruening commented Nov 27, 2014

From bruen...@google.com on August 28, 2014 07:47:37

The challenge of invoking a client event callback on a fault inside DR
is that we do not know what to trust: we cannot easily tell whether it's
safe to acquire the lock for the event callback list, whether data
structures have been corrupted, or what.

@derekbruening
Copy link
Contributor Author

Xref #1717

For non-DR crashes, so a crash in a client lib, it seems best to pass it to the client's fault handler if it registered one, so clients can handle faults in things like inlined memcpy or other client code and not just in gencode or the code cache. The risk is that the client's state is compromised and it hangs or messes up app state and we fail to get a good message to the user.

@derekbruening
Copy link
Contributor Author

Xref #1470 on customized crash messages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant