Use volatile pointers when attempting to trigger SIGSEGVs
authorGary Benson <gbenson@redhat.com>
Mon, 13 Jul 2020 13:47:44 +0000 (14:47 +0100)
committerGary Benson <gbenson@redhat.com>
Mon, 13 Jul 2020 13:47:44 +0000 (14:47 +0100)
commit2a122642b4e4a7ec0f414b30d6ed7c48bc5c2eeb
tree33bbc8cf61298451c57238118d44bd92d9d9ba10
parent3f00c730acee9d452ba81a3083f2c02d13c9f312
Use volatile pointers when attempting to trigger SIGSEGVs

Clang fails to compile a number of files with the following warning:
indirection of non-volatile null pointer will be deleted, not trap
[-Wnull-dereference].  This commit qualifies the relevant pointers
with 'volatile'.

gdb/testsuite/ChangeLog:

* gdb.base/bigcore.c (main): Use a volatile pointer when
attempting to trigger a SIGSEGV.
* gdb.base/gcore-relro-pie.c (break_here): Likewise.
* gdb.base/gcore-tls-pie.c (break_here): Likewise.
* gdb.base/savedregs.c (thrower): Likewise.
* gdb.mi/mi-syn-frame.c (bar): Likewise.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/bigcore.c
gdb/testsuite/gdb.base/gcore-relro-pie.c
gdb/testsuite/gdb.base/gcore-tls-pie.c
gdb/testsuite/gdb.base/savedregs.c
gdb/testsuite/gdb.mi/mi-syn-frame.c