PR30308, infinite recursion in i386_intel_simplify
Alan Modra
amodra@gmail.com
Thu Feb 15 10:50:42 GMT 2024
On Thu, Feb 15, 2024 at 10:23:16AM +0100, Jan Beulich wrote:
> On 15.02.2024 02:28, Alan Modra wrote:
> > This patch exposes the symbol "resolving" flag for use in
> > i386_intel_simplify, not only preventing infinite recursion on the
> > testcase in the PR but also more complicated cases like:
> >
> > .intel_syntax
> > b = a
> > a = b
> > mov eax, [a]
>
> Thanks for addressing this. I wonder though: Wouldn't such circular
> equates better be rejected when they're created?
I wouldn't be inclined to do that. If the symbols are unused then
they don't cause any problem.
> > +/* Return whether a symbol is being resolved. */
> > +
> > +int
> > +symbol_resolving_p (symbolS *s)
> > +{
> > + return s->flags.resolving;
> > +}
>
> Mind me asking that such predicate (and alike) functions, when introduced
> anew, take pointer-to-const right away?
Yes, that would have been a good idea.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list