gdb, testsuite: add gdb.rocm/aspace-nullptr.exp to test nullptr access - #250
gdb, testsuite: add gdb.rocm/aspace-nullptr.exp to test nullptr access#250aktemur wants to merge 1 commit into
Conversation
|
dbgapi companion PR: ROCm/rocm-systems#9707 |
b31cbb8 to
ed7fd03
Compare
ed7fd03 to
7ca2551
Compare
|
Update above is only a rebase. |
Add a new test to check accessing nullptr in various address spaces. Bug: AIROCGDB-645
7ca2551 to
83e2b72
Compare
| { | ||
| /* Make sure that if anything goes wrong, the program eventually | ||
| gets killed. */ | ||
| gdb_watchdog (30); |
There was a problem hiding this comment.
Is this needed? I do not really see the program having an infinite loop or anything that would prevent forward progress.
This seems unnecessary (and often annoying when building manually testcases, as pretty quickly in the debug session, the program just terminates unless we explicitly ask GDB to ignore SIGALRM).
| return | ||
| } | ||
| set bp_line [gdb_get_line_number "Break here"] | ||
| gdb_breakpoint $bp_line -allow-pending -temporary |
There was a problem hiding this comment.
As far as I can see, could just break at kern and have the same effect. No need for a breakpoint by line.
| set aspaces [dict create] | ||
|
|
||
| gdb_test_multiple "maint print address-spaces" "" { | ||
| -re "Name$trailer" { |
There was a problem hiding this comment.
could as well test that maint print address-space gives us the colums we are looking for, so we can detect early if GDB changes in a way which breaks this test
-re "Name${sp}Fiald2${sp}..." {
exp_continue
}
-re "Name${trailer}" {
# indicates the first pattern failed, the header changed, so we can fail the test early
verbose -log "columns changed"
fail $gdb_test_name
}
czidev-amd
left a comment
There was a problem hiding this comment.
Once solved Lancelot questions, I have nothing to add.
|
It seems we're hitting timeouts with the new test. |
|
Could we please make sure this runs clean when O1~O3 and/or flto is used? |
|
Could you please make sure this is clean when using O1~O3 and/or -flto in the testsuite? |
Add a new test to check accessing nullptr in various address spaces.