[llvm] 10affaf - [AArch64][AsmParser] Stop parsing on error (#106804)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 30 14:50:54 PDT 2024
Author: Vitaly Buka
Date: 2024-08-30T14:50:51-07:00
New Revision: 10affaf894a72bee9b84ada77dc943b1bb03d02e
URL: https://github.com/llvm/llvm-project/commit/10affaf894a72bee9b84ada77dc943b1bb03d02e
DIFF: https://github.com/llvm/llvm-project/commit/10affaf894a72bee9b84ada77dc943b1bb03d02e.diff
LOG: [AArch64][AsmParser] Stop parsing on error (#106804)
Fixes buffer overflow after #106625
Added:
Modified:
llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
index 34c0fad45fc499..373f844b239081 100644
--- a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+++ b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
@@ -6995,7 +6995,7 @@ bool AArch64AsmParser::parseDirectiveArch(SMLoc L) {
});
if (It == std::end(ExtensionMap))
- Error(CurLoc, "unsupported architectural extension: " + Name);
+ return Error(CurLoc, "unsupported architectural extension: " + Name);
if (EnableFeature)
STI.SetFeatureBitsTransitively(It->Features);
More information about the llvm-commits
mailing list