[all-commits] [llvm/llvm-project] 0364ba: [clang] Fix possible nullptr deref in BuildCXXNest...
Paul Kirth via All-commits
all-commits at lists.llvm.org
Mon Nov 10 11:28:46 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0364bafdadb7792c59bc9fa54c2a96d4278f9e66
https://github.com/llvm/llvm-project/commit/0364bafdadb7792c59bc9fa54c2a96d4278f9e66
Author: Paul Kirth <paulkirth at google.com>
Date: 2025-11-10 (Mon, 10 Nov 2025)
Changed paths:
M clang/lib/Sema/SemaCXXScopeSpec.cpp
A clang/test/Sema/PR166843.cpp
Log Message:
-----------
[clang] Fix possible nullptr deref in BuildCXXNestedNameSpecifier (#166995)
There is a possible nullptr deref in BuildCXXNestedNameSpecifier when
calling ExtendNestedNameSpecifier or using isa<>. This initially showed
up as a crash in clangd, that didn't manifest in when compiling w/
clang. The reduced test case added in this patch, however does expose
the issue in clang. Testing locally shows that both this test case and
the original clangd issue are fixed by checking the validity of the
pointer before trying to dispatch. Since all code paths require the
pointer to be valid (usually by virtue of a dyn_cast or isa<> check),
there should be no functional difference.
Fixes #166843
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list