diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-03-10 08:22:00 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-03-10 09:37:58 -0700 |
commit | ccb2541ccb4742d6b229bcccef1d90c4d49d849e (patch) | |
tree | 0beca6a212d1831f631b97a265075b955079192a /regexec.c | |
parent | 6f8d7d0df3e3141d61246e6b0a3db12ab1fd7f92 (diff) | |
download | perl-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.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); |