diff options
author | Karl Williamson <public@khwilliamson.com> | 2010-09-15 10:39:34 -0600 |
---|---|---|
committer | Florian Ragwitz <rafl@debian.org> | 2010-09-15 19:29:38 +0200 |
commit | 595598ee1f247e72e06e4cfbe0f98406015df5cc (patch) | |
tree | 0a64c52ba10b45cc0d7e08bb63837ba99659d6d9 /regcomp.h | |
parent | ad4e703e577a4db278c9a482f9057a9c9109c720 (diff) | |
download | perl-595598ee1f247e72e06e4cfbe0f98406015df5cc.tar.gz |
PATCH: regex longjmp flaws
The netbsd - 5.0.2 compiler pointed out that the recent changes to add
longjmps to speed up some regex compilations can result in clobbering a
few values. These depend on the compiled code, and so didn't show up in
other compiler's warnings. This patch reinitializes them after a
longjmp.
Diffstat (limited to 'regcomp.h')
-rw-r--r-- | regcomp.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -767,9 +767,11 @@ re.pm, especially to the documentation. if (re_debug_flags & RE_DEBUG_EXTRA_GPOS) x ) /* initialization */ -/* get_sv() can return NULL during global destruction. */ +/* get_sv() can return NULL during global destruction. re_debug_flags can get + * clobbered by a longjmp, so must be initialized */ #define GET_RE_DEBUG_FLAGS DEBUG_r({ \ SV * re_debug_flags_sv = NULL; \ + re_debug_flags = 0; \ re_debug_flags_sv = get_sv(RE_DEBUG_FLAGS, 1); \ if (re_debug_flags_sv) { \ if (!SvIOK(re_debug_flags_sv)) \ |