Port-vax archive

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

Re: Trying to boot Vaxstation using mopd



On Tue, Jun 28, 2016 at 12:03 AM, Johnny Billquist <bqt%update.uu.se@localhost> wrote:
> Believe it or not, but awk was doing exactly that - a log(0), which would
> cause a silent NaN on other machines.

Hm. When was this as I'm building 6.1.5 it could actually predate that
fix. However I don't see anything like that in CVS after 6.1.5.

In any case I've run into this again. devel/p5-Parse-RecDescent seems
to trigger it. But what I saw previously was that if I run make in
that directory it'll build fine whereas if I run make in the actual
directory I'm trying to install (www/p5-libwww) it'll recurse into the
various dependencies and when it hits devel/p5-Parse-RecDescent it'll
consistently cause this crash.

So I decided to dig a little deeper. I checked out the BSD source and
built awk from there with -g (btw, it doesn't seem to build cleanly, I
have to turn off -Werror due to passing uchar* to libc string
functions expecting char *. Strangely I get warnings even if I build
with -fsigned-char or -funsigned-char). I still get the core dump and
the backtrace is still unintelligible.

So I added an infnan() function (in fact I copied the one from this
doc https://manned.org/infnan/fb4394b1). And indeed the infnan
function behaves as expected:

$ /usr/bin/awk 'BEGIN {print log(0)}' < /dev/null
[1]   Illegal instruction (core dumped) /usr/bin/awk "BEGIN {print
log(0)}" </dev/null

$ ./awk 'BEGIN {print log(0)}' < /dev/null
./awk: log argument out of domain
 source line number 1

But here's the punch-line. Even with the modified awk installed in
/usr/bin I *still* get a core dump from awk when building p5-libwww
and allowing it to recurse down to p5-Partse-RecDescent.

So this strikes my theory that it's related to interrupts or signal
handling. It's repeatable though sensitive to the environment in some
way. I have a hunch it's related to the environment variables that get
set as make recurses, perhaps the sheer quantity of them. But I have
no real evidence for that. But I can't think of much else that's
different when recursing down 6 recursive makes versus running make
directly in that directory.

-- 
greg


Home | Main Index | Thread Index | Old Index