error: allow local errors to trigger abort
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 9 repliesIn review
- v1 RFC3 patches 13 repliesSuperseded
Changes in v2 from the cover letter
Check Error * pointer, not the class, as suggested by Eric. Extend commit log messages with explanation by Eric.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | error: don't rely on pointer comparisonsutil/ | +12 | 4 replies | |
| 2/3 | error: allow local errors to trigger abortinclude/ util/ | +10 | 0 replies | |
| 3/3 | block/nfs: switch to error_init_localblock/ | +1 | 2 replies |
Reviews trailers per patch
2 of 3 patches have a Reviewed-by or Acked-by.
| Patch | Eric Blake |
|---|---|
| 1/3 | R-b |
| 2/3 | R-b |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH v2 0/3] error: allow local errors to trigger abort
It's a common idiom:
Error *local_err = NULL;
....
foo(&local_err);
...
if (local_err) {
error_propagate(errp, local_err);
return;
}
Unfortunately it means that call to foo(&local_err) will not abort even if errp is set to error_abort.
Instead, we get an abort at error_propagate which is too late, that is, the quality of the stack trace is degraded in that it no longer pinpoints the actual cause of failure.
To fix, add an API to check errp and set local_err to error_abort if errp is error_abort.
This is out of RFC but I'm still not converting all users:
let's merge these patches, then I'll convert all users on top.
Changes from v1:
Check Error * pointer, not the class, as suggested by Eric. Extend commit log messages with explanation by Eric.
Michael S. Tsirkin (3):
error: don't rely on pointer comparisons
error: allow local errors to trigger abort
block/nfs: switch to error_init_local
include/qapi/error.h | 5 +++++ block/nfs.c | 2 +- util/error.c | 22 +++++++++++++++++----- 3 files changed, 23 insertions(+), 6 deletions(-)
Signature · 1 line
MST