[comp.lang.perl] PERL dies on Sun4

harald.alvestrand@elab-runit.sintef.no (Harald Tveit Alvestrand) (06/14/90)

This little gem is quite frustrating for me. Has anybody seen its like before?

First, on a Sun3:

perl -e 'open(o,"|cat");print o "hallo\n";'
Prints: hallo

Then, on a Sun4 (tried it on several makes)

perl -e 'open(o,"|cat");print o "hallo\n";'
Segmentation fault (core dumped)

Unfortunately, I am too much of a novice to make much sense of the core....

Seems to work on both PL 15 and PL 18.
Any hints?

             Harald Tveit Alvestrand
             UNINETT postmaster

(Yes, I read the list, but mail gets to me faster)

merlyn@iwarp.intel.com (Randal Schwartz) (06/14/90)

In article <1990Jun13.222949.14007@idt.unit.no>, harald.alvestrand@elab-runit (Harald Tveit Alvestrand) writes:
| Then, on a Sun4 (tried it on several makes)
| 
| perl -e 'open(o,"|cat");print o "hallo\n";'
| Segmentation fault (core dumped)

As a data point, it worked fine on this Sparcstation.  I'm using the
Sun-supplied C compiler.  I compiled it under 4.0.3, although I ran it
under 4.1 (figure *that* one out :-).

open(o,"|cat");print o "Just another Perl hacker,"
-- 
/=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\
| on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III      |
| merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn |
\=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/

Harald.Eikrem@elab-runit.sintef.no (06/15/90)

: | Then, on a Sun4 (tried it on several makes)
: | 
: | perl -e 'open(o,"|cat");print o "hallo\n";'
: | Segmentation fault (core dumped)
:
: As a data point, it worked fine on this Sparcstation.  I'm using the
: Sun-supplied C compiler.  I compiled it under 4.0.3, although I ran it
: under 4.1 (figure *that* one out :-).

Right.  It was compiled with gcc 1.37.1.  I'll try cc.

--Harald Eikrem

harald.alvestrand@elab-runit.sintef.no (Harald Tveit Alvestrand) (06/15/90)

Plain old CC did the trick.
BTW, the test suite DID fail on the gcc compiled version.
Just serves to prove that you should NEVER compile without testing....
Thanks to all who responded. The Net is a GOOD thing!

                            Harald Alvestrand