summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-09-09 15:04:26 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-09-09 15:04:26 +0000
commit77a005ab9f9f951511e847aba59fbf2ab1bb17e3 (patch)
tree238d369e377ec323ac774f3e2fcdd6e61a4a3e7b /perl.c
parent1f5895a1c4980727163b32b39405e3fc770ace84 (diff)
downloadperl-77a005ab9f9f951511e847aba59fbf2ab1bb17e3.tar.gz
Rewrite synchronisation of subs/methods and add attrs
extension for specifying 'locked' and 'method' attributes. p4raw-id: //depot/perl@56
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/perl.c b/perl.c
index c9acca4633..ea8d3fda68 100644
--- a/perl.c
+++ b/perl.c
@@ -83,6 +83,19 @@ static void validate_suid _((char *, char*));
static int fdscript = -1;
+#if defined(DEBUGGING) && defined(USE_THREADS) && defined(__linux__)
+#include <asm/sigcontext.h>
+static void
+catch_sigsegv(int signo, struct sigcontext_struct sc)
+{
+ signal(SIGSEGV, SIG_DFL);
+ fprintf(stderr, "Segmentation fault dereferencing 0x%lx\n"
+ "return_address = 0x%lx, eip = 0x%lx\n",
+ sc.cr2, __builtin_return_address(0), sc.eip);
+ fprintf(stderr, "thread = 0x%lx\n", (unsigned long)THR);
+}
+#endif
+
PerlInterpreter *
perl_alloc()
{
@@ -416,8 +429,10 @@ register PerlInterpreter *sv_interp;
/* startup and shutdown function lists */
SvREFCNT_dec(beginav);
SvREFCNT_dec(endav);
+ SvREFCNT_dec(initav);
beginav = Nullav;
endav = Nullav;
+ initav = Nullav;
/* temp stack during pp_sort() */
SvREFCNT_dec(sortstack);
@@ -855,8 +870,6 @@ print \" \\@INC:\\n @INC\\n\";");
CvOWNER(compcv) = 0;
New(666, CvMUTEXP(compcv), 1, perl_mutex);
MUTEX_INIT(CvMUTEXP(compcv));
- New(666, CvCONDP(compcv), 1, perl_cond);
- COND_INIT(CvCONDP(compcv));
#endif /* USE_THREADS */
comppadlist = newAV();
@@ -872,6 +885,10 @@ print \" \\@INC:\\n @INC\\n\";");
init_os_extras();
#endif
+#if defined(DEBUGGING) && defined(USE_THREADS) && defined(__linux__)
+ DEBUG_L(signal(SIGSEGV, (void(*)(int))catch_sigsegv););
+#endif
+
init_predump_symbols();
if (!do_undump)
init_postdump_symbols(argc,argv,env);