Skip to content

Commit

Permalink
make change#3386 a build-time option (avoids problems due to
Browse files Browse the repository at this point in the history
perl_run() longjmping out)

p4raw-link: @3386 on //depot/perl: 312caa8

p4raw-id: //depot/perl@5162
  • Loading branch information
Gurusamy Sarathy committed Feb 20, 2000
1 parent c9fcc6c commit 14dd3ad
Show file tree
Hide file tree
Showing 16 changed files with 286 additions and 86 deletions.
1 change: 0 additions & 1 deletion Todo-5.6
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Bugs
perl_run() can longjmp out
fix small memory leaks on compile-time failures

Unicode support
Expand Down
48 changes: 41 additions & 7 deletions embed.h
Original file line number Diff line number Diff line change
Expand Up @@ -774,8 +774,10 @@
#define do_pmop_dump Perl_do_pmop_dump
#define do_sv_dump Perl_do_sv_dump
#define magic_dump Perl_magic_dump
#if defined(PERL_FLEXIBLE_EXCEPTIONS)
#define default_protect Perl_default_protect
#define vdefault_protect Perl_vdefault_protect
#endif
#define reginitcolors Perl_reginitcolors
#define sv_2pv_nolen Perl_sv_2pv_nolen
#define sv_2pvutf8_nolen Perl_sv_2pvutf8_nolen
Expand Down Expand Up @@ -902,8 +904,13 @@
#define parse_body S_parse_body
#define run_body S_run_body
#define call_body S_call_body
#define call_xbody S_call_xbody
#define call_list_body S_call_list_body
#if defined(PERL_FLEXIBLE_EXCEPTIONS)
#define vparse_body S_vparse_body
#define vrun_body S_vrun_body
#define vcall_body S_vcall_body
#define vcall_list_body S_vcall_list_body
#endif
# if defined(USE_THREADS)
#define init_main_thread S_init_main_thread
# endif
Expand All @@ -919,6 +926,9 @@
#if defined(PERL_IN_PP_CTL_C) || defined(PERL_DECL_PROT)
#define docatch S_docatch
#define docatch_body S_docatch_body
#if defined(PERL_FLEXIBLE_EXCEPTIONS)
#define vdocatch_body S_vdocatch_body
#endif
#define dofindlabel S_dofindlabel
#define doparseform S_doparseform
#define dopoptoeval S_dopoptoeval
Expand Down Expand Up @@ -2187,7 +2197,9 @@
#define do_pmop_dump(a,b,c) Perl_do_pmop_dump(aTHX_ a,b,c)
#define do_sv_dump(a,b,c,d,e,f,g) Perl_do_sv_dump(aTHX_ a,b,c,d,e,f,g)
#define magic_dump(a) Perl_magic_dump(aTHX_ a)
#if defined(PERL_FLEXIBLE_EXCEPTIONS)
#define vdefault_protect(a,b,c,d) Perl_vdefault_protect(aTHX_ a,b,c,d)
#endif
#define reginitcolors() Perl_reginitcolors(aTHX)
#define sv_2pv_nolen(a) Perl_sv_2pv_nolen(aTHX_ a)
#define sv_2pvutf8_nolen(a) Perl_sv_2pvutf8_nolen(aTHX_ a)
Expand Down Expand Up @@ -2311,11 +2323,16 @@
# if defined(IAMSUID)
#define fd_on_nosuid_fs(a) S_fd_on_nosuid_fs(aTHX_ a)
# endif
#define parse_body(a) S_parse_body(aTHX_ a)
#define parse_body(a,b) S_parse_body(aTHX_ a,b)
#define run_body(a) S_run_body(aTHX_ a)
#define call_body(a) S_call_body(aTHX_ a)
#define call_xbody(a,b) S_call_xbody(aTHX_ a,b)
#define call_body(a,b) S_call_body(aTHX_ a,b)
#define call_list_body(a) S_call_list_body(aTHX_ a)
#if defined(PERL_FLEXIBLE_EXCEPTIONS)
#define vparse_body(a) S_vparse_body(aTHX_ a)
#define vrun_body(a) S_vrun_body(aTHX_ a)
#define vcall_body(a) S_vcall_body(aTHX_ a)
#define vcall_list_body(a) S_vcall_list_body(aTHX_ a)
#endif
# if defined(USE_THREADS)
#define init_main_thread() S_init_main_thread(aTHX)
# endif
Expand All @@ -2330,7 +2347,10 @@
#endif
#if defined(PERL_IN_PP_CTL_C) || defined(PERL_DECL_PROT)
#define docatch(a) S_docatch(aTHX_ a)
#define docatch_body(a) S_docatch_body(aTHX_ a)
#define docatch_body() S_docatch_body(aTHX)
#if defined(PERL_FLEXIBLE_EXCEPTIONS)
#define vdocatch_body(a) S_vdocatch_body(aTHX_ a)
#endif
#define dofindlabel(a,b,c,d) S_dofindlabel(aTHX_ a,b,c,d)
#define doparseform(a) S_doparseform(aTHX_ a)
#define dopoptoeval(a) S_dopoptoeval(aTHX_ a)
Expand Down Expand Up @@ -4289,10 +4309,12 @@
#define do_sv_dump Perl_do_sv_dump
#define Perl_magic_dump CPerlObj::Perl_magic_dump
#define magic_dump Perl_magic_dump
#if defined(PERL_FLEXIBLE_EXCEPTIONS)
#define Perl_default_protect CPerlObj::Perl_default_protect
#define default_protect Perl_default_protect
#define Perl_vdefault_protect CPerlObj::Perl_vdefault_protect
#define vdefault_protect Perl_vdefault_protect
#endif
#define Perl_reginitcolors CPerlObj::Perl_reginitcolors
#define reginitcolors Perl_reginitcolors
#define Perl_sv_2pv_nolen CPerlObj::Perl_sv_2pv_nolen
Expand Down Expand Up @@ -4521,10 +4543,18 @@
#define run_body S_run_body
#define S_call_body CPerlObj::S_call_body
#define call_body S_call_body
#define S_call_xbody CPerlObj::S_call_xbody
#define call_xbody S_call_xbody
#define S_call_list_body CPerlObj::S_call_list_body
#define call_list_body S_call_list_body
#if defined(PERL_FLEXIBLE_EXCEPTIONS)
#define S_vparse_body CPerlObj::S_vparse_body
#define vparse_body S_vparse_body
#define S_vrun_body CPerlObj::S_vrun_body
#define vrun_body S_vrun_body
#define S_vcall_body CPerlObj::S_vcall_body
#define vcall_body S_vcall_body
#define S_vcall_list_body CPerlObj::S_vcall_list_body
#define vcall_list_body S_vcall_list_body
#endif
# if defined(USE_THREADS)
#define S_init_main_thread CPerlObj::S_init_main_thread
#define init_main_thread S_init_main_thread
Expand All @@ -4549,6 +4579,10 @@
#define docatch S_docatch
#define S_docatch_body CPerlObj::S_docatch_body
#define docatch_body S_docatch_body
#if defined(PERL_FLEXIBLE_EXCEPTIONS)
#define S_vdocatch_body CPerlObj::S_vdocatch_body
#define vdocatch_body S_vdocatch_body
#endif
#define S_dofindlabel CPerlObj::S_dofindlabel
#define dofindlabel S_dofindlabel
#define S_doparseform CPerlObj::S_doparseform
Expand Down
22 changes: 16 additions & 6 deletions embed.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2097,10 +2097,12 @@ END
Ap |void |do_sv_dump |I32 level|PerlIO *file|SV *sv|I32 nest \
|I32 maxnest|bool dumpops|STRLEN pvlim
Ap |void |magic_dump |MAGIC *mg
#if defined(PERL_FLEXIBLE_EXCEPTIONS)
Ap |void* |default_protect|volatile JMPENV *je|int *excpt \
|protect_body_t body|...
Ap |void* |vdefault_protect|volatile JMPENV *je|int *excpt \
|protect_body_t body|va_list *args
#endif
Ap |void |reginitcolors
Ap |char* |sv_2pv_nolen |SV* sv
Ap |char* |sv_2pvutf8_nolen|SV* sv
Expand Down Expand Up @@ -2237,11 +2239,16 @@ END
# if defined(IAMSUID)
s |int |fd_on_nosuid_fs|int fd
# endif
s |void* |parse_body |va_list args
s |void* |run_body |va_list args
s |void* |call_body |va_list args
s |void |call_xbody |OP *myop|int is_eval
s |void* |call_list_body |va_list args
s |void* |parse_body |char **env|XSINIT_t xsinit
s |void* |run_body |I32 oldscope
s |void |call_body |OP *myop|int is_eval
s |void* |call_list_body |CV *cv
#if defined(PERL_FLEXIBLE_EXCEPTIONS)
s |void* |vparse_body |va_list args
s |void* |vrun_body |va_list args
s |void* |vcall_body |va_list args
s |void* |vcall_list_body|va_list args
#endif
# if defined(USE_THREADS)
s |struct perl_thread * |init_main_thread
# endif
Expand All @@ -2258,7 +2265,10 @@ END
#if defined(PERL_IN_PP_CTL_C) || defined(PERL_DECL_PROT)
s |OP* |docatch |OP *o
s |void* |docatch_body |va_list args
s |void* |docatch_body
#if defined(PERL_FLEXIBLE_EXCEPTIONS)
s |void* |vdocatch_body |va_list args
#endif
s |OP* |dofindlabel |OP *o|char *label|OP **opstack|OP **oplimit
s |void |doparseform |SV *sv
s |I32 |dopoptoeval |I32 startingblock
Expand Down
5 changes: 1 addition & 4 deletions intrpvar.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
* generated when built with or without MULTIPLICITY. It is also used
* to generate the appropriate export list for win32.
*
* When building without MULTIPLICITY, these variables will be truly global.
*
* Avoid build-specific #ifdefs here, like DEBUGGING. That way,
* we can keep binary compatibility of the curinterp structure */
* When building without MULTIPLICITY, these variables will be truly global. */

/* pseudo environmental stuff */
PERLVAR(Iorigargc, int)
Expand Down
6 changes: 6 additions & 0 deletions objXSUB.h
Original file line number Diff line number Diff line change
Expand Up @@ -1987,6 +1987,7 @@
#define Perl_magic_dump pPerl->Perl_magic_dump
#undef magic_dump
#define magic_dump Perl_magic_dump
#if defined(PERL_FLEXIBLE_EXCEPTIONS)
#undef Perl_default_protect
#define Perl_default_protect pPerl->Perl_default_protect
#undef default_protect
Expand All @@ -1995,6 +1996,7 @@
#define Perl_vdefault_protect pPerl->Perl_vdefault_protect
#undef vdefault_protect
#define vdefault_protect Perl_vdefault_protect
#endif
#undef Perl_reginitcolors
#define Perl_reginitcolors pPerl->Perl_reginitcolors
#undef reginitcolors
Expand Down Expand Up @@ -2151,12 +2153,16 @@
#if defined(PERL_IN_PERL_C) || defined(PERL_DECL_PROT)
# if defined(IAMSUID)
# endif
#if defined(PERL_FLEXIBLE_EXCEPTIONS)
#endif
# if defined(USE_THREADS)
# endif
#endif
#if defined(PERL_IN_PP_C) || defined(PERL_DECL_PROT)
#endif
#if defined(PERL_IN_PP_CTL_C) || defined(PERL_DECL_PROT)
#if defined(PERL_FLEXIBLE_EXCEPTIONS)
#endif
#endif
#if defined(PERL_IN_PP_HOT_C) || defined(PERL_DECL_PROT)
#endif
Expand Down

0 comments on commit 14dd3ad

Please sign in to comment.