[libcxx-commits] [PATCH] D109168: [Unwind] Cast exception class pointer for strcpy

Hans Wennborg via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Sep 2 09:46:16 PDT 2021


hans created this revision.
hans added a reviewer: danielkiss.
Herald added a project: libunwind.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libunwind.
hans requested review of this revision.
Herald added a project: LLVM.

Follow-up to f5b997e6b706 <https://reviews.llvm.org/rGf5b997e6b7061323fff13fafcc0c311d9e78e848>, see comment on https://reviews.llvm.org/D109047


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D109168

Files:
  libunwind/src/UnwindLevel1-gcc-ext.c


Index: libunwind/src/UnwindLevel1-gcc-ext.c
===================================================================
--- libunwind/src/UnwindLevel1-gcc-ext.c
+++ libunwind/src/UnwindLevel1-gcc-ext.c
@@ -109,7 +109,7 @@
   // 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109168.370308.patch
Type: text/x-patch
Size: 457 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210902/5fbb1fbb/attachment.bin>


More information about the libcxx-commits mailing list