diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ChangeLog | 5 | ||||
| -rw-r--r-- | tests/backtrace.c | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index 0d91c3b2..23c5051d 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2013-12-21 Mark Wielaard <[email protected]> + + * backtrace.c (callback_verify): Only assert that case 5 is the last + instruction of backtracegen on x86_64 native. + 2013-12-18 Jan Kratochvil <[email protected]> Mark Wielaard <[email protected]> diff --git a/tests/backtrace.c b/tests/backtrace.c index 06d38782..8a7d6dfc 100644 --- a/tests/backtrace.c +++ b/tests/backtrace.c @@ -118,7 +118,13 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc, mod = dwfl_addrmodule (dwfl, pc); if (mod) symname2 = dwfl_module_addrname (mod, pc); - assert (symname2 == NULL || strcmp (symname2, "backtracegen") != 0); + + // Note that the following assert might in theory even fail on x86_64, + // there is no guarantee that the compiler doesn't reorder the + // instructions or even inserts some padding instructions at the end + // (which apparently happens on ppc64). + if (is_x86_64_native) + assert (symname2 == NULL || strcmp (symname2, "backtracegen") != 0); break; } } |
