Check .debug_str data that is not from DWARF (#1507)

* Check .debug_str data that is not from DWARF

* xplatform check
This commit is contained in:
Yury Delendik
2020-04-14 15:21:42 -05:00
committed by GitHub
parent 27bee2a1a8
commit c5b6c57c34
2 changed files with 66 additions and 11 deletions

View File

@@ -75,3 +75,25 @@ fn test_debug_dwarf_simulate_with_imports_x86_64() -> Result<()> {
)"#,
)
}
#[test]
#[ignore]
#[cfg(all(
any(target_os = "linux", target_os = "macos"),
target_pointer_width = "64"
))]
fn test_debug_dwarf_simulate_with_invalid_name_x86_64() -> Result<()> {
check_wat(
r#"
;; check: DW_TAG_compile_unit
(module (@name "\00")
;; check: DW_TAG_subprogram
;; check: DW_AT_name ("wasm-function[1]")
(import "foo" "bar" (func $import1) )
(func (@name "\00f") (result i32)
(local (@name "l\00") i32)
i32.const 1
)
)"#,
)
}