diff --git a/lib/libunwind/src/AddressSpace.hpp b/lib/libunwind/src/AddressSpace.hpp index 52477b16b355aa2c513c95ceb26ad67567be55f5..01185eb53c4ff40b81b351bf58d525f90782845c 100644 --- a/lib/libunwind/src/AddressSpace.hpp +++ b/lib/libunwind/src/AddressSpace.hpp @@ -666,7 +666,8 @@ inline bool LocalAddressSpace::findUnwindSections( return true; } #endif - dl_iterate_cb_data cb_data = {this, &info, targetAddr}; + // zig patch: https://github.com/llvm/llvm-project/issues/194228 + dl_iterate_cb_data cb_data = {this, &info, static_cast(targetAddr)}; int found = dl_iterate_phdr(findUnwindSectionsByPhdr, &cb_data); return static_cast(found); #endif diff --git a/lib/libunwind/src/DwarfParser.hpp b/lib/libunwind/src/DwarfParser.hpp index 22de49023cb4529dcd2cecde7e585b3f0b51caae..635f8369541af0b4cf9160050e8d9b85c0aca3cb 100644 --- a/lib/libunwind/src/DwarfParser.hpp +++ b/lib/libunwind/src/DwarfParser.hpp @@ -473,11 +473,12 @@ bool CFI_Parser::parseFDEInstructions( pint_t pcoffset; }; + // zig patch: https://github.com/llvm/llvm-project/issues/194228 ParseInfo parseInfoArray[] = { {cieInfo.cieInstructions, cieInfo.cieStart + cieInfo.cieLength, (pint_t)(-1)}, {fdeInfo.fdeInstructions, fdeInfo.fdeStart + fdeInfo.fdeLength, - upToPC - fdeInfo.pcStart}}; + static_cast(upToPC) - fdeInfo.pcStart}}; for (const auto &info : parseInfoArray) { pint_t p = info.instructions;