tech-pkg archive

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

Re: perl on VAX



On Sat, Aug 05, 2017 at 04:28:07PM +0000, John Klos wrote:
> No problem! FYI, I am seeing the text relocations and floating point
> exceptions on a VAX system with userland and perl compiled later in July. A
> system with userland and perl compiled in late June apparently doesn't have
> the same issues. Both run netbsd-8 and both have perl 5.26.0.

netbsd was incorrectly using compiler_rt routines on vax (they
were added to avoid libgcc if possible), and those are written with just
IEEE754 in mind, and trying to do calculations to raise float exception
flags. on vax, they apparently trap. Martin removed a lot of them but
saw the same issue afterwards IIRC.

> perl -lwe 'print 0+"0.29"'
> /usr/local/lib/perl5/5.26.0/vax-netbsd-thread-multi/CORE/libperl.so: text relocations
> Floating exception (core dumped)
> 
> Another run:
> 0.2899999938905239

Cool, so we have simpler code to reason about.
(Apparently XSLoader is its own beast)

That might mean the problem is in the string->float conversion.

>          U strtod
>          U strtol
>          U strtold
>          U strtoul

That implies it might be using netbsd libc's strtod, but I don't see it
when setting a breakpoint in gdb. I will try to look for the function it
uses later.

Also, I tried the same string in simh-vax with C code, and it seemed
right (or at least round-trippable right :))

It's possible it has its own implementation which is unaware of
different float formats, but can't rule out us being the issue.

> Certainly. My packages are build with $LOCALBASE set to /usr/local, BTW:
> 
> https://www.klos.com/~john/perl-5.26.0nb1.tgz
> 
> This is the happy one. The unhappy one needs to be recompiled (I'm not sure
> I ever kept the package). I'll also keep the work directories and will
> upload them when they're done.

Cool - I wanted to be able to try the package myself, but I don't expect
simh-vax to manage to compile it in a sane amount of time.


Home | Main Index | Thread Index | Old Index