[Openmp-commits] [PATCH] D83963: [OpenMP] Use `abort` not `error` for fatal runtime exceptions
Johannes Doerfert via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jul 16 09:55:19 PDT 2020
jdoerfert created this revision.
jdoerfert added reviewers: JonChesterfield, grokos, AndreyChurbanov, ye-luo, tianshilei1992.
Herald added subscribers: sstefan1, guansong, bollu, yaxunl.
Herald added a project: OpenMP.
See PR46515 for the rational but generally, we want to *really* abort
not gracefully shut down.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D83963
Files:
openmp/libomptarget/src/private.h
Index: openmp/libomptarget/src/private.h
===================================================================
--- openmp/libomptarget/src/private.h
+++ openmp/libomptarget/src/private.h
@@ -66,17 +66,17 @@
// implementation for fatal messages
////////////////////////////////////////////////////////////////////////////////
-#define FATAL_MESSAGE0(_num, _str) \
- do { \
- fprintf(stderr, "Libomptarget fatal error %d: %s\n", _num, _str); \
- exit(1); \
+#define FATAL_MESSAGE0(_num, _str) \
+ do { \
+ fprintf(stderr, "Libomptarget fatal error %d: %s\n", _num, _str); \
+ abort(); \
} while (0)
-#define FATAL_MESSAGE(_num, _str, ...) \
- do { \
- fprintf(stderr, "Libomptarget fatal error %d:" _str "\n", _num, \
- __VA_ARGS__); \
- exit(1); \
+#define FATAL_MESSAGE(_num, _str, ...) \
+ do { \
+ fprintf(stderr, "Libomptarget fatal error %d:" _str "\n", _num, \
+ __VA_ARGS__); \
+ abort(); \
} while (0)
// Implemented in libomp, they are called from within __tgt_* functions.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83963.278525.patch
Type: text/x-patch
Size: 1820 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20200716/4c01653b/attachment.bin>
More information about the Openmp-commits
mailing list