]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Fix crash in is_nocall_function
authorTom Tromey <tom@tromey.com>
Sun, 11 Dec 2022 19:48:07 +0000 (12:48 -0700)
committerTom Tromey <tom@tromey.com>
Tue, 13 Dec 2022 04:38:01 +0000 (21:38 -0700)
commit785545988c222f603a7a190170b04d4b971d7959
tree02f38d9402a5a99247598a134fdc670967feaa6d
parentd0d41b77c0cda3b59bc8b82d3d1285db2203de56
Fix crash in is_nocall_function

is_nocall_function anticipates only being called for a function or a
method.  However, PR gdb/29871 points out a situation where an unusual
expression -- but one that parses to a valid, if extremely weird,
function call -- breaks this assumption.

This patch changes is_nocall_function to remove this assert and
instead simply return 'false' in this case.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29871
gdb/gdbtypes.c
gdb/gdbtypes.h
gdb/testsuite/gdb.base/exprs.exp