mirror of
https://github.com/intel/llvm.git
synced 2026-01-14 03:50:17 +08:00
[lld][WebAssembly] update error to continue for R_WASM_FUNCTION_INDEX_I32 (#162403)
with some builds we're getting `[libcxx/include/optional:874](libcxx/include/optional): libc++ Hardening assertion this->has_value() failed: optional operator* called on a disengaged value` since error() adds the errmsg into the stream and continues, but given it's an unsupported relocation type it eventually crashes. Given that I see that we're already using Fatal() in some of the other places where it hits unsupported relocation type, my uneducated guess is that this should be fine.
This commit is contained in:
@@ -439,9 +439,11 @@ bool InputChunk::generateRelocationCode(raw_ostream &os) const {
|
||||
if (!requiresRuntimeReloc)
|
||||
continue;
|
||||
|
||||
if (!isValidRuntimeRelocation(rel.getType()))
|
||||
if (!isValidRuntimeRelocation(rel.getType())) {
|
||||
error("invalid runtime relocation type in data section: " +
|
||||
relocTypetoString(rel.Type));
|
||||
continue;
|
||||
}
|
||||
|
||||
uint64_t offset = getVA(rel.Offset) - getInputSectionOffset();
|
||||
LLVM_DEBUG(dbgs() << "gen reloc: type=" << relocTypeToString(rel.Type)
|
||||
|
||||
Reference in New Issue
Block a user