[PATCH] D143410: [Serialization] Add support for (de)serializing #pragma pack
Dustin L. Howett via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 6 15:14:50 PST 2023
DHowett-MSFT updated this revision to Diff 495285.
DHowett-MSFT added a comment.
@mikerice Alright, it turns out that PragmaPackAlignStorage isn't suitable for this (actually, I'm not sure what it _is_
suitable for) because it's deleted by the time the template gets parsed again.
The `push, slot` case failed nondeterministically because the slot name is being UAF'd.
For now (and I am not sure this is correct), I've chosen to store the slot name in the preprocessor storage.
I suspect that other serialized pack info (not from the pragma, but the attr version that is stored in PragmaPackAlignStorage) is subject to the same limitation...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143410/new/
https://reviews.llvm.org/D143410
Files:
clang/include/clang/Sema/Sema.h
clang/include/clang/Serialization/ASTReader.h
clang/lib/Parse/ParsePragma.cpp
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTWriter.cpp
clang/test/PCH/delayed-template-with-pragma-pack.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143410.495285.patch
Type: text/x-patch
Size: 7137 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230206/60dff250/attachment-0001.bin>
More information about the cfe-commits
mailing list