[all-commits] [llvm/llvm-project] 971833: [Clang] Fix crash in alignment builtins with null ...
nudt_yixiao via All-commits
all-commits at lists.llvm.org
Sat Oct 3 06:59:21 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 971833ee5513f01a57439b15040887932af114fc
https://github.com/llvm/llvm-project/commit/971833ee5513f01a57439b15040887932af114fc
Author: nudt_yixiao <1272950933 at qq.com>
Date: 2026-10-03 (Sat, 03 Oct 2026)
Changed paths:
M clang/docs/LanguageExtensions.md
M clang/docs/ReleaseNotes.md
M clang/lib/AST/ByteCode/InterpBuiltin.cpp
M clang/lib/AST/ExprConstant.cpp
M clang/test/Sema/builtin-align.c
M clang/test/SemaCXX/builtin-align-cxx.cpp
Log Message:
-----------
[Clang] Fix crash in alignment builtins with null pointers (#224549)
Clang can crash when evaluating __builtin_align_up,
__builtin_align_down, or __builtin_is_aligned with a null pointer.
Avoid querying base alignment for pointers without an underlying object
during constant evaluation.
Null pointers are handled as always aligned values, while other
base-less pointers are rejected rather than interpreted using their
numeric address.
Assisted-by: GPT-5.6
AI was used to assist with code analysis, debugging, and drafting the PR
description. I personally debugged, reviewed and verified the changes,
tested the code, and fully understand the submitted contribution.
Fixes https://github.com/llvm/llvm-project/issues/216999
Co-authored-by: Timm Baeder <tbaeder at redhat.com>
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