Open steve-s opened 2 years ago
We can start by defining some simple internal abstraction: report_invalid_handle(handle)
, and some basic implementation that would use backtrace where available and print some generic message otherwise. This should be fairly simple and would already provide some nice improvement.
At this point, if HPy detects an issue in the debug mode, it prints a generic message and aborts the process(*).
It should provide more context to help with debugging of the issue, i.e., "diagnostics output":
__repr__
?Implementation:
backtrace
, there seems to be some API for this on Windows too(*) In case of the mmap based raw data protection mechanism (#259), it just segfaults, which we should improve by registering a handler and then we can provide the same diagnostics there too.