Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: perl segfaults when parsing script

by ariels (Curate)
on Jun 27, 2002 at 12:14 UTC ( #177683=note: print w/ replies, xml ) Need Help??


in reply to perl segfaults when parsing script

No, I've not. In fact, I just tried it with both perl 5.005_03 and perl 5.6.1 on sun4-solaris, and could get no segfault:

<bioserv 117 [15:14] ~ >perl -e 'chop $x' <bioserv 118 [15:14] ~ >perl -e 'chop FOO' Can't modify constant item in chop at -e line 1, at EOF Execution of -e aborted due to compilation errors. <bioserv 119 [15:14] ~ >perl -e 'chop "BAR"' Can't modify constant item in chop at -e line 1, at EOF Execution of -e aborted due to compilation errors. <bioserv 120 [15:14] ~ >perl -v This is perl, version 5.005_03 built for sun4-solaris
(Similar results for 5.6.1 dropped)

Of course, I didn't have access to your program which segfaults perl. It could be helpful to give a minimal example which fails (= something I can try to run on my machine), as well as the output of "perl -V".


Comment on Re: perl segfaults when parsing script
Select or Download Code
Re: Re: perl segfaults when parsing script
by amphiplex (Monk) on Jun 27, 2002 at 12:31 UTC
    That's interesting.
    Some cases where I get segfaults:

    ======= v5.6.1 built for i586-linux, on Linux central 2.4.18 #9 SMP
    kurt@central:~> perl -e 'chop foo' Segmentation fault

    ======= v5.6.1 built for sun4-solaris, on SunOS xxxx 5.8 Generic_108528-14 sun4u sparc SUNW,Sun-Fire
    [xxxxx: ~] perl -e 'chop foo' Modification of a read-only value attempted. Segmentation Fault (core dumped)
    ======= v5.6.1 built for alpha-dec_osf, on OSF1 xxxx V4.0 1229 alpha
    [xxxxx: ~] perl -e 'chop foo' Segmentation fault (core dumped)
    ======= v5.6.1 built for PA-RISC1.1, on HP-UX xxxx B.11.11 U 9000/800
    yyyy@xxxx:> perl -e 'chop foo' Modification of a read-only value attempted. Bus error(coredump)


    ----- kurt
      Strange...

      "perl -e 'chop foo'" dumps core on "perl, v5.6.1 built for i686-linux", "perl, v5.6.1 built for IP27-irix", and "perl, v5.6.1 built for alpha-dec_osf" (except there it also manages to print an error message "Modification of a read-only value attempted." before it dies horribly). Not on "perl, v5.6.1 built for sun4-solaris", though.

      I've compared configs, and I can't find anything distinctively different that would cause sun4-solaris to survive.

      perlbug.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://177683]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2014-07-13 23:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (252 votes), past polls