diff --git a/libcxxabi/test/forced_unwind2.pass.cpp b/libcxxabi/test/forced_unwind2.pass.cpp index 6ec27e4a65557..edd0a3b175f06 100644 --- a/libcxxabi/test/forced_unwind2.pass.cpp +++ b/libcxxabi/test/forced_unwind2.pass.cpp @@ -44,10 +44,8 @@ struct Stop { }; static void forced_unwind() { - _Unwind_Exception* exc = new _Unwind_Exception; - memset(&exc->exception_class, 0, sizeof(exc->exception_class)); - exc->exception_cleanup = 0; - _Unwind_ForcedUnwind(exc, Stop<_Unwind_Stop_Fn>::stop, 0); + static _Unwind_Exception exc = {}; + _Unwind_ForcedUnwind(&exc, Stop<_Unwind_Stop_Fn>::stop, 0); abort(); }