The last version of this patch created problems because it was using the placement new with unaligned addresses.
This version tries to address this issue. I've enabled ubsan locally and not seen problems when running the interpreter test suite.
Paths
| Differential D139185
[clang][Interp] Use placement new to construct opcode args into vector ClosedPublic Authored by tbaeder on Dec 2 2022, 2:52 AM.
Details Summary The last version of this patch created problems because it was using the placement new with unaligned addresses. This version tries to address this issue. I've enabled ubsan locally and not seen problems when running the interpreter test suite.
Diff Detail Event TimelineComment Actions Generally looks correct to me.
tbaeder marked 2 inline comments as done. This revision is now accepted and ready to land.Jan 13 2023, 11:48 AM Closed by commit rG1221af99281c: [clang][Interp] Use placement new to construct opcode args into vector (authored by tbaeder). · Explain WhyJan 19 2023, 12:24 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 480873 clang/lib/AST/Interp/ByteCodeEmitter.cpp
clang/lib/AST/Interp/PrimType.h
clang/lib/AST/Interp/Source.h
|
I think Size should be something more like Value -- I was thrown off by the pointer-based aligned that was treating the pointer as an integer value for Size. :-D