[libunwind] 1bc175d - [Unwind] Cast exception class pointer for strcpy
Hans Wennborg via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 2 10:01:40 PDT 2021
Author: Hans Wennborg
Date: 2021-09-02T19:01:30+02:00
New Revision: 1bc175d486b5bf2ae5dd46c1e85342f2f2734b1f
URL: https://github.com/llvm/llvm-project/commit/1bc175d486b5bf2ae5dd46c1e85342f2f2734b1f
DIFF: https://github.com/llvm/llvm-project/commit/1bc175d486b5bf2ae5dd46c1e85342f2f2734b1f.diff
LOG: [Unwind] Cast exception class pointer for strcpy
Follow-up to f5b997e6b706, see comment on
https://reviews.llvm.org/D109047
Differential revision: https://reviews.llvm.org/D109168
Added:
Modified:
libunwind/src/UnwindLevel1-gcc-ext.c
Removed:
################################################################################
diff --git a/libunwind/src/UnwindLevel1-gcc-ext.c b/libunwind/src/UnwindLevel1-gcc-ext.c
index c3fa8b6655713..4172540ef0874 100644
--- a/libunwind/src/UnwindLevel1-gcc-ext.c
+++ b/libunwind/src/UnwindLevel1-gcc-ext.c
@@ -109,7 +109,7 @@ _Unwind_Backtrace(_Unwind_Trace_Fn callback, void *ref) {
// Create a mock exception object for force unwinding.
_Unwind_Exception ex;
memset(&ex, '\0', sizeof(ex));
- strcpy(&ex.exception_class, "CLNGUNW");
+ strcpy((char *)&ex.exception_class, "CLNGUNW");
#endif
// walk each frame
More information about the cfe-commits
mailing list