diff options
author | Andreas Arnez <arnez at linux dot vnet dot ibm dot com> | 2013-11-12 18:03:54 +0100 |
---|---|---|
committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2013-11-12 19:03:02 +0100 |
commit | ee7615e1f3384c36e41fdf176abdabf8f21d1505 (patch) | |
tree | 6efd5acf94248e865510cf535ae8ab76b07a020a /ld/ldmisc.h | |
parent | 8943b874760d9cf35b71890a70af9866e4fab2a6 (diff) | |
download | gdb-ee7615e1f3384c36e41fdf176abdabf8f21d1505.zip gdb-ee7615e1f3384c36e41fdf176abdabf8f21d1505.tar.gz gdb-ee7615e1f3384c36e41fdf176abdabf8f21d1505.tar.bz2 |
Fix GDB crash with upstream GCC due to qsort(NULL, ...)
Upstream GCC's new pass '-fisolate-erroneous-paths' may introduce
traps at places where GCC has determined undefined behavior, e.g. when
passing a NULL pointer to a function that defines this argument as
__attribute__(__nonnull__(...)). In particular this applies to
uniquify_strings(), because it invokes qsort() with NULL when the
'strings' vector is empty. I hit this problem on s390x when trying to
execute "break main" on a C program.
gdb/
2013-11-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
* objc-lang.c (uniquify_strings): Prevent invoking qsort with
NULL.
Diffstat (limited to 'ld/ldmisc.h')
0 files changed, 0 insertions, 0 deletions