Re: The number of ways I've independently discovered to make Perl segfault:
by enoch (Chaplain) on Sep 24, 2003 at 17:07 UTC
|
| [reply] |
|
ActivePerl Build 635
Built under MSWin32
Compiled at Feb 4 2003 15:34:21
With the following command:
perl -P
"Perl has generated errors ..." == a segfault in windows terms.
Under Unix I've not seen Perl segfault unless I was playing with threads and fork()ing.
| [reply] |
Had to vote for 3
by tbone1 (Monsignor) on Sep 24, 2003 at 20:53 UTC
|
And Saint Merlyn raised the Holy Code on high, saying "Oh Lord Wall, please bless this thy Holy Hand Grenade of Perl code, so that thine followers' processes may be blown to bits, in thy mercy." And The Lord Wall did grin, and the people did feast on the lambs, and stoats, and orangutans, and fruit bats, and large chu-- ...
(Skipping ahead a bit ...)
And the Lord Wall spake "Three shall be the number of the segfaults, and the number of the segfaults shall be three. Four shall there not be, neither shall there be two, unless thou then proceedst to make segfault three. Five is right out!
...
Oh, I've had enough of this. I always wanted to be ... a lumberjack!!!
--
tbone1
Ain't enough 'O's in 'stoopid' to describe that guy.
- Dave "the King" Wilson | [reply] |
Re: The number of ways I've independently discovered to make Perl segfault:
by hardburn (Abbot) on Sep 24, 2003 at 16:46 UTC
|
Only one I could think of at the moment: trying to use PeekPoke on Cygwin.
---- I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
Note: All code is untested, unless otherwise stated
| [reply] |
Re: The number of ways I've independently discovered to make Perl segfault:
by vili (Monk) on Sep 24, 2003 at 17:37 UTC
|
Segfault, thats unPerl. unless, the user is being undude. ref. "The big Lebowski"
~vili
"You are out of your element Donnie, the rug's not the point here Dude"
-John Goodman | [reply] |
Re: The number of ways I've independently discovered to make Perl segfault:
by chromatic (Archbishop) on Sep 24, 2003 at 19:32 UTC
|
Okay, I'm not responsible for any segfaults in Perl proper, but I have really botched up the optree a couple of times with the proper modules. On the plus side, Artur told me that he has had the same experience with B::Generate — and he maintains it!
| [reply] |
Re: The number of ways I've independently discovered to make Perl segfault:
by scrottie (Scribe) on Sep 28, 2003 at 12:16 UTC
|
sub f {
my $x = shift;
*z = $x;
}
f({});
f();
Dave Mitchell solved this within a week and gave this
description:
"the second call to f() has $x as type RV (due to the previous call), but
!ROK - due to the undef assignment. sv_setsv_flags() didn't check for
ROK in this context."
This was discovered while writing Object::Lexical. It
stuffs closures into a stash created to represent an
object - each object is its own blessed stash. I assumed
(incorrectly) that the problem had something to do
with blessing stashes.
The fix is in 5.8.1.
Hats off to the Perl 5 Porters! You guys rock!
-scott
| [reply] [d/l] |
Re: The number of ways I've independently discovered to make Perl segfault:
by dws (Chancellor) on Sep 24, 2003 at 17:35 UTC
|
I've discovered ways to make XS-based modules segfault, but not Perl proper. Since it'd be unfair to point the finger at Perl for some third-party's C problems, I have to vote zero.
| [reply] |
|
| [reply] |
Re: The number of ways I've independently discovered to make Perl segfault:
by jonadab (Parson) on Sep 25, 2003 at 04:30 UTC
|
I find it interesting that when I saw this poll, I was
in the process of reviewing an
old node
of mine that mentioned one way to get 5.6 to dump core.
I've also recently discovered an incredibly effective
way to get Perl to dump core: run it on a filesystem
that's corrupted in a way that causes stuff in general
to dump core. (Perl dumps core... Emacs dumps core...
ls dumps core sometimes...)
$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}}
split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/
| [reply] [d/l] |
Re: The number of ways I've independently discovered to make Perl segfault:
by castaway (Parson) on Sep 25, 2003 at 05:15 UTC
|
Currently by using perl 5.8.1-RC5 and ithreads.. still not sure quite why (but still, it only segfaults on exit, 5.8.0 was doing it on share() .. )
And another before that, but I forget what that was..
C. | [reply] |
Re: The number of ways I've independently discovered to make Perl segfault:
by fraktalisman (Hermit) on Sep 24, 2003 at 16:01 UTC
|
Maybe I made Perl crash but didn't notice as I mainly use Perl scripts on my provider's webserver. | [reply] |
If I did...
by DentArthurDent (Monk) on Sep 24, 2003 at 19:16 UTC
|
I don't recall ever doing it, but I can assure you that if I have, it was certainly my own fault for doing something stupid! ;) | [reply] |
Re: The number of ways I've independently discovered to make Perl segfault:
by Phaysis (Pilgrim) on Sep 26, 2003 at 00:35 UTC
|
Although it's not particularly all-Perl, I have made it segfault/crash about once or twice in a coding session about a year ago. See, there's something that just doesn't work right when you mix AS 5.6 and ImageMagick on Win98se. Was it I::M? Or was it Perl? My mind boggles.
One of these days, I'm gonna use a proper platform for that. :grins:
(Ph) Phaysis (Shawn)
If idle hands are the tools of the devil, are idol tools the hands of god? | [reply] |
Re: The number of ways I've independently discovered to make Perl segfault:
by Moriarty (Abbot) on Sep 24, 2003 at 23:48 UTC
|
C I can get to seg-fault quite regularly, but I haven't done any serious programming in Perl ..... yet :-)
| [reply] |
Re: The number of ways I've independently discovered to make Perl segfault:
by Aristotle (Chancellor) on Sep 30, 2003 at 20:36 UTC
|
I've made vanilla Perl (ie no non-Perl extensions loaded) segv a number of times. I voted three only because I can't remember precisely; in reality it's probably more like 5 or 6. Almost all of them involved slushing around in the symbol tables one way or another (local trickery ranks high on the list); one of them was DESTROY related. I never took notes though. (In retrospect - maybe I should have perlbugged them?)
Makeshifts last the longest.
| [reply] |
Re: The number of ways I've independently discovered to make Perl segfault:
by Anonymous Monk on Oct 01, 2003 at 11:36 UTC
|
I've found two, but they are my fault.
One way was to call an ioctl function with too short input buffer, but then perl printed a nice warning about this and dumped core only after that. (This one was because I wrote 8092 instead 256*32, I must admit that perl can multiply better than me). The other was by calling the regexp engine inside a /(?{CODE})/ construct. | [reply] [d/l] |
Here's my bit
by aquitaine (Novice) on Oct 08, 2003 at 01:01 UTC
|
perl -wle ' print unpack ("p*", "202.54.9.1");'
Null terminated string pointer , got it by accident. | [reply] |
|
I've never crashed it, I mainly use Perl in *nix :-P, even using sockets and TCP/IP stuff, maybe Im just too conservative while coding
| [reply] |
|
Me thinks I am also to conservative while coding to create such errors. They are definitely cool to check out and figure out why they do what they do.
Personally for me, it gives me a greater understanding of what is actually happening behind the scenes.
Sorry no new code!
| [reply] |
Re: The number of ways I've independently discovered to make Perl segfault:
by shenme (Priest) on Oct 01, 2003 at 11:30 UTC
|
I need to change my answer, to one. Perl v5.6.1 for i386-linux using modules CGI, CGI::Application, CGI::FormBuilder, CGI::Session, and (depressing the dromedary's dome) Storable, as in
$session = CGI::Session->new( 'driver:File;serializer:Storable',
$q, {Directory=>'/tmp'} );
But throwing in a gratuitous $session->close() cured all that. Sigh.... | [reply] [d/l] |
Re: The number of ways I've independently discovered to make Perl segfault:
by gwhite (Friar) on Oct 06, 2003 at 13:22 UTC
|
Those are caused by _my_ code... Huh, never made the connection...
| [reply] |
Re: The number of ways I've independently discovered to make Perl segfault:
by photon (Novice) on Oct 02, 2003 at 14:13 UTC
|
i've crashed perl a lot of times. but fortunately i can not remember how ;) what i can say is that it was almost everytime my own fault. now i seem to be able to write less dirty code because i even can't remember when the last core dump was ;) most times it had to do with bloat caused by inefficient recursions or eating a lot of memory etc. that really isn't perl's fault. i like perl because it's fast and stable. reliable on many platforms. but of course only if your code is clean ;) | [reply] |
Re: The number of ways I've independently discovered to make Perl segfault:
by etcshadow (Priest) on Oct 04, 2003 at 20:34 UTC
|
I understand that some of this may have been fixed in more recent versions of perl (this is in 5.005), but forking and signal handling seems to do the trick, fairly often. Maybe somewhere around one in twenty executions I can get a segfault. | [reply] |
Re: The number of ways I've independently discovered to make Perl segfault:
by chacham (Prior) on May 27, 2015 at 12:49 UTC
|
Does "independently" mean found without (anyone else's) help or does it mean ways that are independent of each other?
| [reply] |