Revert "[Dwarf] Support __ptrauth qualifier in metadata nodes" (#83672)
Reverts llvm/llvm-project#82363 See a build failure related to an issue discovered by memory sanitizer (use of uninitialized value): https://lab.llvm.org/buildbot/#/builders/37/builds/31965
This commit is contained in:
1 parent
c4f59937ca
commit
bf08d02868
16 files changed
+100
-388
No files matched your search
@@ -1556,7 +1556,7 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata(
|
||||
break;
|
||||
}
|
||||
case bitc::METADATA_DERIVED_TYPE: {
|
||||
if (Record.size() < 12 || Record.size() > 15)
|
||||
if (Record.size() < 12 || Record.size() > 14)
|
||||
return error("Invalid record");
|
||||
|
||||
// DWARF address space is encoded as N->getDWARFAddressSpace() + 1. 0 means
|
||||
@@ -1566,18 +1566,8 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata(
|
||||
DWARFAddressSpace = Record[12] - 1;
|
||||
|
||||
Metadata *Annotations = nullptr;
|
||||
std::optional<DIDerivedType::PtrAuthData> PtrAuthData;
|
||||
|
||||
// Only look for annotations/ptrauth if both are allocated.
|
||||
// If not, we can't tell which was intended to be embedded, as both ptrauth
|
||||
// and annotations have been expected at Record[13] at various times.
|
||||
if (Record.size() > 14) {
|
||||
if (Record[13])
|
||||
Annotations = getMDOrNull(Record[13]);
|
||||
|
||||
if (Record[14])
|
||||
PtrAuthData = DIDerivedType::PtrAuthData(Record[14]);
|
||||
}
|
||||
if (Record.size() > 13 && Record[13])
|
||||
Annotations = getMDOrNull(Record[13]);
|
||||
|
||||
IsDistinct = Record[0];
|
||||
DINode::DIFlags Flags = static_cast<DINode::DIFlags>(Record[10]);
|
||||
@@ -1587,7 +1577,7 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata(
|
||||
getMDOrNull(Record[3]), Record[4],
|
||||
getDITypeRefOrNull(Record[5]),
|
||||
getDITypeRefOrNull(Record[6]), Record[7], Record[8],
|
||||
Record[9], DWARFAddressSpace, PtrAuthData, Flags,
|
||||
Record[9], DWARFAddressSpace, Flags,
|
||||
getDITypeRefOrNull(Record[11]), Annotations)),
|
||||
NextMetadataNo);
|
||||
NextMetadataNo++;
|
||||
|
||||
Reference in new issue
Block a user