summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-03-10 08:22:00 -0700
committerKarl Williamson <public@khwilliamson.com>2011-03-10 09:37:58 -0700
commitccb2541ccb4742d6b229bcccef1d90c4d49d849e (patch)
tree0beca6a212d1831f631b97a265075b955079192a /regexec.c
parent6f8d7d0df3e3141d61246e6b0a3db12ab1fd7f92 (diff)
downloadperl-ccb2541ccb4742d6b229bcccef1d90c4d49d849e.tar.gz
regexec.c: Add assert() to detect inconsistent ANYOF
There have been various segfaults apparently due to trying to access the swash (and allies) portion of an ANYOF which doesn't have that. This doesn't show up on all platforms. The assert() should detect this and help debugging
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/regexec.c b/regexec.c
index b9e5852cd2..69ddba5d16 100644
--- a/regexec.c
+++ b/regexec.c
@@ -6432,6 +6432,8 @@ Perl_regclass_swash(pTHX_ const regexp *prog, register const regnode* node, bool
PERL_ARGS_ASSERT_REGCLASS_SWASH;
+ assert(ANYOF_NONBITMAP(node));
+
if (data && data->count) {
const U32 n = ARG(node);