This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] gdb: Check for not allocated/associated values during array slicing
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Mon, 10 Jun 2019 18:22:38 -0400
- Subject: [binutils-gdb] gdb: Check for not allocated/associated values during array slicing
*** TEST RESULTS FOR COMMIT a7067863418451b27130bb4300ac1890ff806c12 ***
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Branch: master
Commit: a7067863418451b27130bb4300ac1890ff806c12
gdb: Check for not allocated/associated values during array slicing
When extracting an array slice we should give up if the array is
not-allocated or not-associated. For Fortran, at least in gfortran
compiled code, the upper and lower bounds are undefined if the array
is not allocated or not associated, in which case performing checks
against these bounds will result in undefined behaviour.
Better then to throw an error if we try to slice such an array. This
changes the error message that the user will receive in these
cases (if they got an error message before). Previously they may have
gotten "slice out of range" now they'll get "array not allocated" or
"array not associated".
gdb/ChangeLog:
* valops.c (value_slice): Check for not allocated or not
associated values.
gdb/testsuite/ChangeLog:
* gdb.fortran/vla-sizeof.exp: Update expected results.
- Follow-Ups:
- Failures on RHEL-s390x-m64, branch master
- Failures on Debian-s390x-m64, branch master
- Failures on Fedora-x86_64-cc-with-index, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
- Failures on Fedora-x86_64-native-gdbserver-m32, branch master
- Failures on Fedora-x86_64-m32, branch master
- Failures on Debian-s390x-native-gdbserver-m64, branch master
- Failures on Fedora-x86_64-native-gdbserver-m64, branch master
- Failures on Debian-s390x-native-extended-gdbserver-m64, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Fedora-x86_64-m64, branch master
- Failures on Fedora-i686, branch master