You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to make a library that an IDE links against. It would be unacceptable if a bug in the library crashed the IDE process. Obviously perfect crash-proofness is unattainable (halting problem), but there's a lot of bugs that can be checked with Zig's runtime safety checks.
Is it possible to install a panic handler in my library so that if anything in the library panics, my library functions return with an error instead of bringing down the host application? Possibly something with setjmp/longjmp?
(This might be outside the scope of Zig) Is it possible to install a segfault handler that does something similar?
The library's API would all be mostly stateless functions, possibly doing IO, but not spawning extra threads or anything. The library would not call any non-zig library, so the whole library should be statically linked, I think.
The text was updated successfully, but these errors were encountered:
here is a custom segfault handler for posix and windows that might point you in the right direction. i'm not sure if you know nim but i imagine you can understand whats going on.
I want to make a library that an IDE links against. It would be unacceptable if a bug in the library crashed the IDE process. Obviously perfect crash-proofness is unattainable (halting problem), but there's a lot of bugs that can be checked with Zig's runtime safety checks.
Is it possible to install a panic handler in my library so that if anything in the library panics, my library functions return with an error instead of bringing down the host application? Possibly something with setjmp/longjmp?
(This might be outside the scope of Zig) Is it possible to install a segfault handler that does something similar?
The library's API would all be mostly stateless functions, possibly doing IO, but not spawning extra threads or anything. The library would not call any non-zig library, so the whole library should be statically linked, I think.
The text was updated successfully, but these errors were encountered: