bug-m4
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: possible infinite loop in m4


From: Eric Blake
Subject: Re: possible infinite loop in m4
Date: Tue, 6 Jul 2010 08:56:12 -0400 (EDT)

----- "Mike Frysinger" <address@hidden> wrote:
> > That's a bug in the user's configure.ac script for not quoting
> things
> > correctly in the first place.  Autoconf can't work around every
> > piece of bad code thrown at it, and my recommendation would
> > be to fix rezound rather than trying to throw more workarounds in
> > autoconf to avoid this bad code at the expense of penalizing
> > performance on good code.
> 
> i agree rezound has crappy code (i made suggestions for throwing out
> the whole 
> thing for something better), but i think m4 should be smarter about
> infinite 
> loops.  this could just as easily been a typo and about the only way
> to track 
> it down is to literally start commenting out things in the source
> until it 
> stops looping forever.  that's a poor development environment imo.

What you're asking for is a solution to the halting problem.  It isn't
going to happen - that's an NP-Complete class algorithm, and the
amount of computing power required for those is prohibitively
expensive.  I stand by my assertion that autoconf's use of m4
cannot reliably determine whether the user intended to cause an
infinite loop, or just had bad input, but that if a user sticks to
the language documented in the autoconf manual, they should not
be triggering infinite loops due to poor quoting in the first place.

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]