compiler: test traps report correct line numbers (#1528)
Signed-off-by: Nuno Cruces <ncruces@users.noreply.github.com>
This commit is contained in:
@@ -19,6 +19,9 @@ var TinyGoWasm []byte
|
||||
//go:embed testdata/zig/main.wasm
|
||||
var ZigWasm []byte
|
||||
|
||||
//go:embed testdata/zig-cc/main.wasm
|
||||
var ZigCCWasm []byte
|
||||
|
||||
// RustWasm comes with huge DWARF sections, so we do not check it in directly,
|
||||
// but instead xz-compressed one is.
|
||||
var RustWasm []byte
|
||||
|
||||
13
internal/testing/dwarftestdata/testdata/zig-cc/main.c
vendored
Normal file
13
internal/testing/dwarftestdata/testdata/zig-cc/main.c
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
volatile int base = 65536;
|
||||
|
||||
void a() {
|
||||
char str[16];
|
||||
str[4] = 'a';
|
||||
str[8] = 'b';
|
||||
str[12 + base] = 'c'; // This traps.
|
||||
}
|
||||
|
||||
int main() {
|
||||
a();
|
||||
return 0;
|
||||
}
|
||||
BIN
internal/testing/dwarftestdata/testdata/zig-cc/main.wasm
vendored
Executable file
BIN
internal/testing/dwarftestdata/testdata/zig-cc/main.wasm
vendored
Executable file
Binary file not shown.
Reference in New Issue
Block a user