]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
PR 30308 more unbounded recursion
authorAlan Modra <amodra@gmail.com>
Wed, 22 Jul 2026 23:53:52 +0000 (09:23 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 23 Jul 2026 00:12:43 +0000 (09:42 +0930)
commit85fb82cc8c960e97c5a51f51b87b19a3e6263c50
tree091142097873ab8030245026c10d2fbf830293ce
parent4bfb17e60abb1bd0a9704f474a1fffd48038028d
PR 30308 more unbounded recursion

oss-fuzz found another case where i386_intel_simplify and
i386_intel_simplify_symbol recurse until stack overflow.  This time
recursion happened on an expression with both X_add_symbol and
X_op_symbol, the call stack alternating on the two symbols.  Fix
that case too.

* config/tc-i386-intel.c (i386_intel_simplify): Mark X_add_symbol
whenever calling i386_intel_simplify_symbol for X_op_symbol.
* testsuite/gas/i386/intel-equ-loop.s,
* testsuite/gas/i386/intel-equ-loop.l: Extend testcase.
gas/config/tc-i386-intel.c
gas/testsuite/gas/i386/intel-equ-loop.l
gas/testsuite/gas/i386/intel-equ-loop.s