diff options
author | smanna12 <soumi.manna@intel.com> | 2024-06-03 16:20:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-03 18:20:33 -0500 |
commit | ccaccc3367aa3d892ca31eb11d4bcea4979bead1 (patch) | |
tree | 123d60c8e251d2446b61a3419ba1c6c23f79c8bb /llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp | |
parent | ae1596a31a6fac2f4daafe1e256d4a5cf3742617 (diff) | |
download | llvm-ccaccc3367aa3d892ca31eb11d4bcea4979bead1.zip llvm-ccaccc3367aa3d892ca31eb11d4bcea4979bead1.tar.gz llvm-ccaccc3367aa3d892ca31eb11d4bcea4979bead1.tar.bz2 |
[Clang] Prevent null pointer dereference in target attribute mangling (#94228)
This patch adds assertions in the getMangledNameImpl() function to
ensure that the expected target attributes (TargetAttr,
TargetVersionAttr, and TargetClonesAttr) are not null before they are
passed to appendAttributeMangling() to prevent potential null pointer
dereferences and improve the robustness of the attribute mangling
process.
This assertion will trigger a runtime error with a clear message in
debug build if any of the expected attributes are missing, facilitating
early and easier diagnosis and debugging of such issues related to
attribute mangling.
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp')
0 files changed, 0 insertions, 0 deletions