diff options
| author | Petr Machata <[email protected]> | 2011-03-09 01:10:26 +0100 |
|---|---|---|
| committer | Petr Machata <[email protected]> | 2011-03-09 01:10:26 +0100 |
| commit | c2366ba2f3e0e9b09e5fa3555d81317782597eca (patch) | |
| tree | b2d1b81b205f39390237670bee57a70e49859837 /dwarflint/tests | |
| parent | f338f9ba56ce3f53138e1ab477c2ede44810d3fa (diff) | |
dwarflint: Check that there's enough data for .debug_line opcode
- fixes a SEGV on invalid data. Test case provided
Diffstat (limited to 'dwarflint/tests')
| -rw-r--r-- | dwarflint/tests/garbage-5.bz2 | bin | 0 -> 2780 bytes | |||
| -rwxr-xr-x | dwarflint/tests/run-bad.sh | 8 |
2 files changed, 7 insertions, 1 deletions
diff --git a/dwarflint/tests/garbage-5.bz2 b/dwarflint/tests/garbage-5.bz2 Binary files differnew file mode 100644 index 00000000..9b0401eb --- /dev/null +++ b/dwarflint/tests/garbage-5.bz2 diff --git a/dwarflint/tests/run-bad.sh b/dwarflint/tests/run-bad.sh index 779ec27d..2da33b65 100755 --- a/dwarflint/tests/run-bad.sh +++ b/dwarflint/tests/run-bad.sh @@ -27,7 +27,8 @@ srcdir=$srcdir/tests -testfiles hello.bad-1 hello.bad-3 garbage-1 garbage-2 garbage-3 garbage-4 +testfiles hello.bad-1 hello.bad-3 garbage-1 garbage-2 garbage-3 garbage-4 \ + garbage-5 testrun_compare ./dwarflint hello.bad-1 <<EOF error: .debug_info: DIE 0x83: abbrev section at 0x0 doesn't contain code 83. @@ -58,3 +59,8 @@ EOF testrun_compare ./dwarflint garbage-4 <<EOF error: .debug_info: DIE 0x6c: this DIE claims that its sibling is 0x80000085 but it's actually 0x85. EOF + +testrun_compare ./dwarflint garbage-5 <<EOF +error: .debug_line: offset 0x3e: not enough data to read an opcode of length 5. +error: .debug_info: DIE 0xb (abbr. attribute 0xc): unresolved reference to .debug_line table 0x0. +EOF |
