Commit 8426544
Make ur_context_handle_t_ destructor non-throwing (#20887)
UR_CHECK_ERROR may throw or abort, which is unsafe to use from a
destructor. If an exception escapes during stack unwinding,
std::terminate would be called.
Replace UR_CHECK_ERROR in ur_context_handle_t_ destructor with a
non-throwing, best-effort cleanup. In debug builds, failures are
reported via assert/log, while release builds avoid throwing from the
destructor.
fixes: intel/llvm#208111 parent 1dc130f commit 8426544
2 files changed
+3
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
101 | | - | |
| 99 | + | |
102 | 100 | | |
103 | 101 | | |
104 | 102 | | |
| |||
0 commit comments