[lld] [LLD] Fix crash on parsing ':ALIGN' in linker script (PR #146723)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 3 02:25:06 PDT 2025
================
@@ -1229,6 +1229,9 @@ SymbolAssignment *ScriptParser::readSymbolAssignment(StringRef name) {
// This is an operator-precedence parser to parse a linker
// script expression.
Expr ScriptParser::readExpr() {
+ // Do not try to read expression if an error has already been encountered.
+ if (atEOF())
----------------
smithp35 wrote:
Thanks for the updates. This looks OK to me. I've added the maintainer MaskRay and MysteryMath, who has been involved in linker script parsing recently.
https://github.com/llvm/llvm-project/pull/146723
More information about the llvm-commits
mailing list