[PATCH] D92001: [ubsan] Fix crash on __builtin_assume_aligned

2023-01-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. `-fsanitize=alignment -c a.c -O[012]` no longer crashes for the test. From the comment that the problem was up the call chain, I think we can close this revision now. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92001/new/ https://reviews.llvm.org/D92001 ___

[PATCH] D92001: [ubsan] Fix crash on __builtin_assume_aligned

2023-01-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri resigned from this revision. lebedev.ri added a comment. This revision now requires review to proceed. Herald added a subscriber: StephenFan. Herald added a project: All. This review seems to be stuck/dead, consider abandoning if no longer relevant. CHANGES SINCE LAST ACTION https:/

[PATCH] D92001: [ubsan] Fix crash on __builtin_assume_aligned

2020-12-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri requested changes to this revision. lebedev.ri added a comment. This revision now requires changes to proceed. @orivej please can you look where we create AST nodes for these builtins and ensure that the "pointer" argument is actually converted into a pointer beforehand? I'm afraid i

[PATCH] D92001: [ubsan] Fix crash on __builtin_assume_aligned

2020-12-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:2524 // defined. - if (Ty->getPointeeType().isVolatileQualified()) + if (!Ty->getPointeeType().isNull() && Ty->getPointeeType().isVolatileQualified()) return; lebede

[PATCH] D92001: [ubsan] Fix crash on __builtin_assume_aligned

2020-12-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:2524 // defined. - if (Ty->getPointeeType().isVolatileQualified()) + if (!Ty->getPointeeType().isNull() && Ty->getPointeeType().isVolatileQualified()) return; vsk wrote

[PATCH] D92001: [ubsan] Fix crash on __builtin_assume_aligned

2020-12-02 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:2524 // defined. - if (Ty->getPointeeType().isVolatileQualified()) + if (!Ty->getPointeeType().isNull() && Ty->getPointeeType().isVolatileQualified()) return; Is the pointee t

[PATCH] D92001: [ubsan] Fix crash on __builtin_assume_aligned

2020-12-02 Thread Orivej Desh via Phabricator via cfe-commits
orivej added a comment. Could somebody review this? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92001/new/ https://reviews.llvm.org/D92001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[PATCH] D92001: [ubsan] Fix crash on __builtin_assume_aligned

2020-11-23 Thread Orivej Desh via Phabricator via cfe-commits
orivej added a comment. Sorry, I don't understand the issue and can't write a better description. Since this test triggers an assert in getCommonPtr that it "Cannot retrieve a NULL type pointer" of Ty->getPointeeType(), the fix just checks that the pointee is not null before using isVolatileQual

[PATCH] D92001: [ubsan] Fix crash on __builtin_assume_aligned

2020-11-23 Thread Orivej Desh via Phabricator via cfe-commits
orivej updated this revision to Diff 307239. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92001/new/ https://reviews.llvm.org/D92001 Files: clang/lib/CodeGen/CodeGenFunction.cpp clang/test/CodeGen/ubsan-assume-aligned-crash.c Index: clang/test/CodeGen/ubsan-assume-aligned-crash.c

[PATCH] D92001: [ubsan] Fix crash on __builtin_assume_aligned

2020-11-23 Thread Orivej Desh via Phabricator via cfe-commits
orivej created this revision. orivej added reviewers: lebedev.ri, Tyker, rsmith. orivej added projects: clang, Sanitizers. Herald added a subscriber: cfe-commits. orivej requested review of this revision. Fixes PR45813 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D92001 Files