aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-readobj/llvm-readobj.cpp
diff options
context:
space:
mode:
authorPeter Steinfeld <psteinfeld@nvidia.com>2021-03-08 08:21:30 -0800
committerPeter Steinfeld <psteinfeld@nvidia.com>2021-03-08 15:01:36 -0800
commitcfd7d8123a3b1e77343763ac2b62124bfcffe6d6 (patch)
tree3e965c129e17d828e8254663e47909d48aeacdd6 /llvm/tools/llvm-readobj/llvm-readobj.cpp
parent535a4192a9d19ef5d474f1d6bfa1ab9f08b2b1c7 (diff)
downloadllvm-cfd7d8123a3b1e77343763ac2b62124bfcffe6d6.zip
llvm-cfd7d8123a3b1e77343763ac2b62124bfcffe6d6.tar.gz
llvm-cfd7d8123a3b1e77343763ac2b62124bfcffe6d6.tar.bz2
[flang] Fix bad dereference of NULLIFY pointer object
When we have a subprogram that has been determined to contain errors, we do not perform name resolution on its execution part. In this case, if the subprogram contains a NULLIFY statement, the parser::Name of a pointer object in a NULLIFY statement will not have had name resolution performed on it. Thus, its symbol will not have been set. Later, however, we do semantic checking on the NULLIFY statement. The code that did this assumed that the parser::Name of the pointer object was non-null. I fixed this by just removing the null pointer check for the "symbol" member of the "parser::Name" of the pointer object when doing semantic checking for NULLIFY statements. I also added a test that will make the compiler crash without this change. Differential Revision: https://reviews.llvm.org/D98184
Diffstat (limited to 'llvm/tools/llvm-readobj/llvm-readobj.cpp')
0 files changed, 0 insertions, 0 deletions