Permalink
Browse files

Fix error (corrupted stack) when loading regexes

Error was: panic: memory wrap

This is a fix for issue #64

See perldoc perlcall
  • Loading branch information...
perlpunk committed Dec 16, 2017
1 parent c1e1e43 commit cdf4c3cb02d92c7edfb62f937e4d36db2dd639d4
Showing with 4 additions and 0 deletions.
  1. +4 −0 LibYAML/perl_libyaml.c
View
@@ -513,6 +513,10 @@ load_regexp(perl_yaml_loader_t * loader)
SPAGAIN;
regexp = newSVsv(POPs);
PUTBACK;
FREETMPS;
LEAVE;
if (strlen(tag) > strlen(prefix) && strnEQ(tag, prefix, strlen(prefix))) {
char *class = tag + strlen(prefix);
sv_bless(regexp, gv_stashpv(class, TRUE));

0 comments on commit cdf4c3c

Please sign in to comment.