Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Funky Ref Count Issues when Coro is loaded and verbose=>2 #148

Open
bluefeet opened this issue Oct 9, 2015 · 1 comment
Open

Funky Ref Count Issues when Coro is loaded and verbose=>2 #148

bluefeet opened this issue Oct 9, 2015 · 1 comment

Comments

@bluefeet
Copy link

bluefeet commented Oct 9, 2015

Check this out:

: perl -e 'use Text::Xslate; print Text::Xslate->new( verbose=>2 )->render_string(q[<: my $foo="bar"; $foo.invalid(); :> HELLO WORLD])'
Text::Xslate: Undefined method invalid called for 'bar' (<string>:1) at -e line 1.
----------------------------------------------------------------------------
<: my $foo="bar"; $foo.invalid(); :> HELLO WORLD
----------------------------------------------------------------------------
Text::Xslate: Use of nil to print (<string>:1) at -e line 1.
----------------------------------------------------------------------------
<: my $foo="bar"; $foo.invalid(); :> HELLO WORLD
----------------------------------------------------------------------------
 HELLO WORLD

exit code of above is 0 (ok).

And now all I do is add Coro:

: perl -e 'use Coro; use Text::Xslate; print Text::Xslate->new( verbose=>2 )->render_string(q[<: my $foo="bar"; $foo.invalid(); :> HELLO WORLD])'
Text::Xslate: Undefined method invalid called for 'bar' (<string>:1) at -e line 1.
----------------------------------------------------------------------------
<: my $foo="bar"; $foo.invalid(); :> HELLO WORLD
----------------------------------------------------------------------------
Text::Xslate: Use of nil to print (<string>:1) at -e line 1.
----------------------------------------------------------------------------
<: my $foo="bar"; $foo.invalid(); :> HELLO WORLD
----------------------------------------------------------------------------
Attempt to free unreferenced scalar: SV 0x1501648, Perl interpreter: 0x103b010 at -e line 1.
Attempt to free unreferenced scalar: SV 0x1501648, Perl interpreter: 0x103b010 during global destruction.

exit code of above is 2 (NOT ok).

I don't know that there is anything to do about this in Xslate. But if there is I thought I'd report it. I prefer to assume that Coro is the culprit.

@bluefeet
Copy link
Author

bluefeet commented Oct 9, 2015

Note that verbose=>1 with Coro also has issues:

: perl -e 'use Coro; use Text::Xslate; print Text::Xslate->new( verbose=>1 )->render_string(q[<: my $foo="bar"; $foo.invalid(); :> HELLO WORLD])'
Text::Xslate: Undefined method invalid called for 'bar' (<string>:1) at -e line 1.
----------------------------------------------------------------------------
<: my $foo="bar"; $foo.invalid(); :> HELLO WORLD
----------------------------------------------------------------------------
 HELLO WORLDAttempt to free unreferenced scalar: SV 0x291c648, Perl interpreter: 0x2456010 during global destruction.

But in this case the exit code is 0, it just comes with that nice ref count issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant