aboutsummaryrefslogtreecommitdiff
path: root/libbacktrace/allocfail.c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2024-03-11 10:57:31 +0100
committerTom de Vries <tdevries@suse.de>2024-03-11 10:57:31 +0100
commit72ab7ac8be993e29f8a393b72dc681d627b12d19 (patch)
treed22e9b1773d7dbc3e0f91ae7a11df7d1fde06e2d /libbacktrace/allocfail.c
parent85041a8d518b4e0625b2bb1d007838dfd5cbe421 (diff)
downloadbinutils-72ab7ac8be993e29f8a393b72dc681d627b12d19.zip
binutils-72ab7ac8be993e29f8a393b72dc681d627b12d19.tar.gz
binutils-72ab7ac8be993e29f8a393b72dc681d627b12d19.tar.bz2
gdb/testsuite: Fix gdb.threads/threadcrash.exp with check-readmore
With check-readmore, I run into: ... FAIL: gdb.threads/threadcrash.exp: test_corefile: \ $thread_count == [llength $test_list] ... The problem is that the clauses in the gdb_test_multiple for "thread apply all backtrace" intent to match one line, but actually can match more than one line, and consequently a match for one type of thread can consume a line that was supposed to match another thread. For instance, there's this regexp: ... -re "\[^\n\]*syscall_task .location=SIGNAL_ALT_STACK\[^\n\]*" { ... It's limited at the end by \[^\n\]*, meaning the match stops at the end of the line. But it doesn't start with a ^, and consequently can match more than one line. The "\[^\n\]*" at the start doesn't prevent this, there's an implicit .* at the start of each pattern, unless it's anchored using a ^. Fix this by rewriting the regexps in a "^\r\n$hs$regexp$hs$eol" style, where: - hs is: \[^\n\]* (horizontal space), and - eol is (?=\r\n) (look-ahead end-of-line). It also turned out to be necessary to drop the -lbl switch, and introduce a corresponding explicit clause. The -lbl clause is placed ALAP, and consequently allowed the default fail clause to trigger. Tested on arm-linux and x86_64-linux.
Diffstat (limited to 'libbacktrace/allocfail.c')
0 files changed, 0 insertions, 0 deletions