Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: perl segfaults when parsing script

by ariels (Curate)
on Jun 27, 2002 at 12:14 UTC ( [id://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".

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://177683]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-18 20:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found