summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-04-10 15:03:10 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-04-10 15:03:10 +0000
commitccafdc969fe8361303a07e7576d1af4e3e389a76 (patch)
treec3293fc91f18c7cbb117b22c48f515a1ee701193 /pp_hot.c
parent79e63f36d616e2a045841795af8be1361f55c9ed (diff)
downloadperl-ccafdc969fe8361303a07e7576d1af4e3e389a76.tar.gz
Fix [perl #34892] Segfault on &DB::sub declared but not defined
p4raw-id: //depot/perl@24215
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp_hot.c b/pp_hot.c
index dcacf630aa..85b42aa016 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2672,8 +2672,8 @@ PP(pp_entersub)
sv_setiv(PL_DBassertion, 1);
cv = get_db_sub(&sv, cv);
- if (!cv)
- DIE(aTHX_ "No DBsub routine");
+ if (!cv || (!CvXSUB(cv) && !CvSTART(cv)))
+ DIE(aTHX_ "No DB::sub routine defined");
}
if (!(CvXSUB(cv))) {