From: Ilya Zakharevich Date: Sat, 9 Aug 1997 08:12:20 +0000 (+1200) Subject: Re: "perl -d" dumps core when loading syslog.ph X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0996bf4347dd0a5b669d26c3867f4ed296150f0a;p=p5sagit%2Fp5-mst-13.2.git Re: "perl -d" dumps core when loading syslog.ph In article , Stephen McCamant wrote: > Jochen Wiedmann writes: > > The following command dumps core on my machine: > > > > [joe@laptop joe]$ perl -d -MSys::Syslog > > Signal SEGV at /sw/linux-i386/perl-5.004.03/lib/site_perl/syslog.ph > > line 1 > > require syslog.ph called at > > /sw/share/perl-5.004.03/lib/Sys/Syslog.pm line 111 > > [...] > > IOT trap/Abort (core dumped) > > > > Without "-d" or without loading "syslog.ph" all works fine. > > This is almost certainly the same problem Greg Ward reported about a > week ago: > > Greg Ward wrote: > > In fact, I was able to reduce the bug to > > > > % perl -d -e "BEGIN { eval 'sub LOG_KERN () {0<<3;}' }" > > I still haven't seen anything from Ilya (whose reply was apparently > lost in the UPenn changeover), so in the spirit of needing it twice, > here's a patch: > > --- perl5.004_02/pp_ctl.c Sat Aug 9 00:11:51 1997 > +++ perl5.004_02+/pp_ctl.c Fri Aug 29 16:51:36 1997 > @@ -2104,7 +2104,7 @@ Lemme try again. In my missing message I explained that the same problem may hunt my (?{...}) stuff for regexps. I removed the monstrous patch proposed in the previous message, here is the alternative: Credited: Stephen McCamant p5p-msgid: 1997Aug30.034921.2297381@cor.newman.upenn.edu --- diff --git a/pp_ctl.c b/pp_ctl.c index 561c9fd..81033fc 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -2226,6 +2226,7 @@ int gimme; CvDEPTH(compcv) = 1; SP = stack_base + POPMARK; /* pop original mark */ + op = saveop; /* The caller may need it. */ RETURNOP(eval_start); }