summaryrefslogtreecommitdiff
path: root/lldb/test/API/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py
diff options
context:
space:
mode:
authorsmanna12 <soumi.manna@intel.com>2024-07-01 08:51:28 -0700
committerGitHub <noreply@github.com>2024-07-01 10:51:28 -0500
commit05d8ea77c9bbdedc462dadfdcc41332253c1c829 (patch)
treed36c4444b6fe9ed472507eb2e2e767e7e09f8cc2 /lldb/test/API/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py
parente8574e8ada76e38fab951969dc1c97eef5b0cc60 (diff)
[Clang] Prevent null pointer dereferences in SVE tuple functions (#94267)
This patch addresses a null pointer dereference issue reported by static analyzer tool in the `EmitSVETupleSetOrGet()` and `EmitSVETupleCreate()` functions. Previously, the function assumed that the result of `dyn_cast<>` to `ScalableVectorType` would always be non-null, which is not guaranteed. The fix introduces a null check after the `dyn_cast<>` operation. If the cast fails and `SingleVecTy` is null, the function now returns `nullptr` to indicate an error. This prevents the dereference of a null pointer, which could lead to undefined behavior. Additionally, the assert message has been corrected to accurately reflect the expected conditions. These changes collectively enhance the robustness of the code by ensuring type safety and preventing runtime errors due to improper type casting.
Diffstat (limited to 'lldb/test/API/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py')
0 files changed, 0 insertions, 0 deletions