Skip to content

Commit bb76c4e

Browse files
qiongsiwucurmudg-eon
authored andcommitted
[clang][Modules] Fix the Size of RecordDecl's BitCodeAbbrevOp (llvm#133500)
https://github.com/llvm/llvm-project/pull/102040/files#diff-125f472e690aa3d973bc42aa3c5d580226c5c47661551aca2889f960681aa64dR2477 added 1 bit to `RecordDecl`'s serialization format, but did not increment its abbreviation size. This can lead to rare cases where a record may overflow if the `RecordDecl`'s `getArgPassingRestrictions()` returns something bigger than 1 (see [here](https://github.com/llvm/llvm-project/blob/b3f01a6aa45b00240cec1c64286b85d7ba87e2af/clang/lib/Serialization/ASTWriterDecl.cpp#L688)). rdar://143763558 (cherry picked from commit 4a73c99)
1 parent 8cb7660 commit bb76c4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Serialization/ASTWriterDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2594,7 +2594,7 @@ void ASTWriter::WriteDeclAbbrevs() {
25942594
// RecordDecl
25952595
Abv->Add(BitCodeAbbrevOp(
25962596
BitCodeAbbrevOp::Fixed,
2597-
13)); // Packed Record Decl Bits: FlexibleArrayMember,
2597+
14)); // Packed Record Decl Bits: FlexibleArrayMember,
25982598
// AnonymousStructUnion, hasObjectMember, hasVolatileMember,
25992599
// isNonTrivialToPrimitiveDefaultInitialize,
26002600
// isNonTrivialToPrimitiveCopy, isNonTrivialToPrimitiveDestroy,

0 commit comments

Comments
 (0)