We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 979d1a2 commit 4e6d60cCopy full SHA for 4e6d60c
library/panic_unwind/src/emcc.rs
@@ -95,8 +95,7 @@ pub unsafe fn cleanup(ptr: *mut u8) -> Box<dyn Any + Send> {
95
}
96
97
pub unsafe fn panic(data: Box<dyn Any + Send>) -> u32 {
98
- let sz = mem::size_of_val(&data);
99
- let exception = __cxa_allocate_exception(sz) as *mut Exception;
+ let exception = __cxa_allocate_exception(mem::size_of::<Exception>()) as *mut Exception;
100
if exception.is_null() {
101
return uw::_URC_FATAL_PHASE1_ERROR as u32;
102
0 commit comments