Temporarily fix wasmtime on aarch64 by not constructing per-inst address map. (#1541)
The current build of wasmtime on aarch64 panics immediately because the debug infrastructure constructs an address-to-instruction map unconditionally now, and the new backend does not yet support debug info generally (#1523). In this particular case, the address-map construction consults the encoding info, which is not implemented by the new backend and causes the panic. This fix simply avoids generating per-instruction entries in the address map; it at least gets us going until we plumb SourceLocs all the way through the new pipeline.
This commit is contained in:
@@ -125,6 +125,9 @@ fn get_function_address_map<'data>(
|
|||||||
let mut blocks = func.layout.blocks().collect::<Vec<_>>();
|
let mut blocks = func.layout.blocks().collect::<Vec<_>>();
|
||||||
blocks.sort_by_key(|block| func.offsets[*block]); // Ensure inst offsets always increase
|
blocks.sort_by_key(|block| func.offsets[*block]); // Ensure inst offsets always increase
|
||||||
|
|
||||||
|
// FIXME(#1523): New backend does not support debug info or instruction-address mapping
|
||||||
|
// yet.
|
||||||
|
if !isa.get_mach_backend().is_some() {
|
||||||
let encinfo = isa.encoding_info();
|
let encinfo = isa.encoding_info();
|
||||||
for block in blocks {
|
for block in blocks {
|
||||||
for (offset, inst, size) in func.inst_offsets(block, &encinfo) {
|
for (offset, inst, size) in func.inst_offsets(block, &encinfo) {
|
||||||
@@ -136,6 +139,7 @@ fn get_function_address_map<'data>(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Generate artificial srcloc for function start/end to identify boundary
|
// Generate artificial srcloc for function start/end to identify boundary
|
||||||
// within module. Similar to FuncTranslator::cur_srcloc(): it will wrap around
|
// within module. Similar to FuncTranslator::cur_srcloc(): it will wrap around
|
||||||
|
|||||||
Reference in New Issue
Block a user