exception fixes #162

Merged
sb10q merged 2 commits from pca006132/artiq-zynq:exception into master 2022-01-26 07:17:30 +08:00
  • Faster exception unwinding. (as we now only do a single phase unwinding)
  • Better backtrace. (as we now have forced unwinding)
  • Exception allocation. (names are not yet allocated)
  • Nested exception support. (error reporting is not yet done)

The first commit (use forced unwinding) is backward compatible with the old compiler, and does not do exception allocation and nested exception support.

The second commit should be used together with artiq exception branch, which contains the compiler modification required for this to work.

- Faster exception unwinding. (as we now only do a single phase unwinding) - Better backtrace. (as we now have forced unwinding) - Exception allocation. (names are not yet allocated) - Nested exception support. (error reporting is not yet done) The first commit (use forced unwinding) is backward compatible with the old compiler, and does not do exception allocation and nested exception support. The second commit should be used together with artiq exception branch, which contains the compiler modification required for this to work.
pca006132 added 1 commit 2022-01-14 19:33:06 +08:00
8923feceac runtime/eh_artiq: use forced unwind
This patches ports the LLVM libunwind newly added forced unwinding
function. This enables us to run forced unwinding to obtain correct
backtrace when uncaught exceptions occur.

This patch also changes the exception handling scheme from the standard
two-phase unwinding to single phase using forced unwinding. This brings
some performance improvement and prepared for later nested exception
support. For nested exceptions, we will have to record the backtrace
regardless if the exception is an uncaught exception, as there can be
another exception being thrown while executing the finally block for
caught exceptions, and we will lose the backtrace if we don't store it
earlier before running the cleanup pads.
pca006132 force-pushed exception from b2171ff091 to 86f10e0ab5 2022-01-14 19:39:08 +08:00 Compare
sb10q reviewed 2022-01-14 21:47:59 +08:00
@ -205,3 +205,3 @@
api!(__artiq_personality = eh_artiq::artiq_personality),
api!(__artiq_raise = eh_artiq::raise),
api!(__artiq_reraise = eh_artiq::reraise),
// api!(__artiq_reraise = eh_artiq::reraise),

remove completely? no need for this commented-out code.

remove completely? no need for this commented-out code.

yes, would fix later

yes, would fix later
pca006132 force-pushed exception from fe21f0803c to 1eda780a11 2022-01-17 21:09:43 +08:00 Compare
pca006132 force-pushed exception from a1d923066c to 2fa8c1ce23 2022-01-19 14:23:43 +08:00 Compare
pca006132 force-pushed exception from 423abfb782 to 6f5ba46e89 2022-01-23 21:31:26 +08:00 Compare
pca006132 changed title from WIP: exception fixes to exception fixes 2022-01-23 21:34:04 +08:00
sb10q merged commit 6f5ba46e89 into master 2022-01-26 07:17:30 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/artiq-zynq#162
There is no content yet.