-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Bruce Dubbs wrote:
>> Three tests were skipped:
>>
>> cannot tell stack overflow from crash; consider installing libsigsegv
>> SKIP: test-c-stack2.sh
>> Skipping test: multithreading not enabled
>> SKIP: test-lock
>> Skipping test: multithreading not enabled
>> SKIP: test-tls
> 
> We may want to configure m4 with:
> 
> ./configure --prefix=/usr  --enable-threads
> 
> for a complete build.

(Hmm.  I'm not quite sure what advantage threads would have in a macro
expansion language's "compiler".  I assume they have *some*, since it's
work to add threading support, but it seems to me like one of the things
that'd be fairly low on the list.  But hey, whatever.)

The only way I see that causing problems is if the threading support
isn't quite right (i.e. bugs in m4), and some kind of race condition
makes it emit wrong output.  Not sure how long threading support been
available, though; maybe it's been in there long enough that it isn't an
issue.  Doesn't matter much to me either way.

> I don't know if we want to consider libsigsegv or not.  I 
> don't know of anything other than m4 that uses it.

m4 only uses it to distinguish between a "real" segfault and a stack
overflow, on systems where it can't tell the difference (like Linux,
apparently).  I saw a reference in either bison or autom4te -- probably
autom4te -- to an m4 flag controlling how many macro expansions it would
generate before it assumed there was an infinite recursion.  (autom4te
had to increase this flag because some random autofoo tool ran into the
default limit of 250.)

Since then, m4 has raised this default limit from 250 to 0 ("infinity"),
and relies on detecting a stack overflow to decide whether the m4 input
is actually infinitely recursive.  It uses libsigsegv to do that.

(There's also a comment on some commit somewhere that says "maybe I can
get the Linux kernel to report stack overflows properly", which would
mean Linux wouldn't require libsigsegv.  But that was only a few months
ago, so I wouldn't want to rely on it happening.)

So I guess it depends on whether we want m4 to be able to detect
infinite recursion by stack overflow.  I think that if all the tools
have set the limit argument properly, it shouldn't matter (meaning we
wouldn't need libsigsegv).  But they may not set it properly in the
future.

Maybe revisit for 7.0?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI+2UsS5vET1Wea5wRA0l/AKCjtJj3sNA2UnvQo890jUJsI2wvKwCfbruH
4iMFMEET3ii5MYSyoF5CcuM=
=/nk7
-----END PGP SIGNATURE-----
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to