[llvm] [AArch64][AsmParser] Stop parsing on error (PR #106804)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 30 14:48:33 PDT 2024
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/106804
Fixes buffer overflow after #106625
>From 4217cc1b050871bc84e957daa44404115a1f8e3b Mon Sep 17 00:00:00 2001
From: Vitaly Buka <vitalybuka at google.com>
Date: Fri, 30 Aug 2024 14:48:19 -0700
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
=?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Created using spr 1.3.4
---
llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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