Fix for non-regexps being upgraded to SVt_REGEXP
$ ./perl -lwe '$a = ${qr//}; $a = 2; print re::is_regexp(\$a)'
1
It is possible for arbitrary SVs (eg PAD entries) to be upgraded to
SVt_REGEXP. (This is new with first class regexps)
Whilst the example above does not SEGV, it will be possible to write
code that will cause SEGVs (or worse) at the point when the scalar is freed,
because the code in sv_clear() assumes that all scalars of type
SVt_REGEXP *are* regexps, and passes them to pregfree2(), which assumes that
pointers within are valid.