File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -5765,7 +5765,9 @@ void IRGenSILFunction::visitBeginUnpairedAccessInst(
57655765 // in which case we should use the caller, which is generally ok because
57665766 // materializeForSet can't usually be thunked.
57675767 llvm::Value *pc;
5768- if (hasBeenInlined (access)) {
5768+ // Wasm doesn't have returnaddress because it can't access call frame
5769+ // for security purposes
5770+ if (IGM.Triple .isWasm () || hasBeenInlined (access)) {
57695771 pc = llvm::ConstantPointerNull::get (IGM.Int8PtrTy );
57705772 } else {
57715773 auto retAddrFn =
Original file line number Diff line number Diff line change 4242#elif _MSC_VER
4343#include < intrin.h>
4444#define get_return_address () _ReturnAddress()
45+ #elif defined(__wasm__)
46+ // Wasm can't access call frame for security purposes
47+ #define get_return_address () ((void *) 0 )
4548#else
4649#error missing implementation for get_return_address
4750#define get_return_address () ((void *) 0 )
You can’t perform that action at this time.
0 commit comments