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

Recover from compile_jit() crashes #10

Open
eafurst opened this issue Sep 14, 2018 · 0 comments
Open

Recover from compile_jit() crashes #10

eafurst opened this issue Sep 14, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@eafurst
Copy link

eafurst commented Sep 14, 2018

Halide is very conservative when it comes to error handling, calling abort() whenever an error occur, regardless of the severity. This behavior ends up killing the debugger, most notably during compile_jit() calls.

While there's no easy way to circumvent the issue without major changes to how Halide responds to (and reports) errors, a workaround would be to fork() the debugger process at the compile_jit() site, have the child process try to call it first, and if successful, call it in the parent process.

This is quite silly, but not that terrible...
More annoyingly is the fact that Windows does not have a proper fork() routine...

Update: apparently, it's possible to compile with WITH_EXCEPTIONS and throw an exception out of a custom CompileTimeErrorReporter, or just catch the existing exception thrown by the default CompileTimeErrorReporter. Still an undesirable solution, as it would force the debugger host to have exceptions enabled.

@slomp slomp added the enhancement New feature or request label Sep 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants