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

Repeated use of temp reveals SPESH bug #3784

Closed
p6rt opened this issue Apr 16, 2015 · 5 comments
Closed

Repeated use of temp reveals SPESH bug #3784

p6rt opened this issue Apr 16, 2015 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Apr 16, 2015

Migrated from rt.perl.org#124318 (status was 'resolved')

Searchable as RT124318$

@p6rt
Copy link
Author

p6rt commented Apr 16, 2015

From @lizmat

$ 6 'my $x; multi sub foo($n where True) { temp $x; }; foo(True) for ^22’
(no pb)

$ 6 'my $x; multi sub foo($n where True) { temp $x; }; foo(True) for ^23'
Segmentation fault​: 11

$ 6 MVM_SPESH_DISABLE=1 6 'my $x; multi sub foo($n where True) { temp $x; }; foo(True) for ^23’
(no pb)

This is basically what test 5 in t/spec/integration/weird-errors.t is about.

@p6rt
Copy link
Author

p6rt commented Jun 10, 2015

From @jnthn

On Thu Apr 16 12​:27​:25 2015, elizabeth wrote​:

$ 6 'my $x; multi sub foo($n where True) { temp $x; }; foo(True) for
^22’
(no pb)

$ 6 'my $x; multi sub foo($n where True) { temp $x; }; foo(True) for
^23'
Segmentation fault​: 11

$ 6 MVM_SPESH_DISABLE=1 6 'my $x; multi sub foo($n where True) { temp
$x; }; foo(True) for ^23’
(no pb)

This is basically what test 5 in t/spec/integration/weird-errors.t is
about.

Some further analysis​: If you run it for longer without spesh it explodes anyway​:

jnthn@​(none)​:~/dev/rakudo$ MVM_SPESH_DISABLE=1 ./perl6-m -e 'my $x; multi sub foo($n where True) { temp $x; }; foo(True) for ^150;'
jnthn@​(none)​:~/dev/rakudo$ MVM_SPESH_DISABLE=1 ./perl6-m -e 'my $x; multi sub foo($n where True) { temp $x; }; foo(True) for ^5550;'
Segmentation fault

So not a dynamic optimizer bug after all.

@p6rt
Copy link
Author

p6rt commented Jun 10, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jun 10, 2015

From @jnthn

On Wed Jun 10 02​:55​:11 2015, jnthn@​jnthn.net wrote​:

Some further analysis​: If you run it for longer without spesh it
explodes anyway​:

jnthn@​(none)​:~/dev/rakudo$ MVM_SPESH_DISABLE=1 ./perl6-m -e 'my $x;
multi sub foo($n where True) { temp $x; }; foo(True) for ^150;'
jnthn@​(none)​:~/dev/rakudo$ MVM_SPESH_DISABLE=1 ./perl6-m -e 'my $x;
multi sub foo($n where True) { temp $x; }; foo(True) for ^5550;'
Segmentation fault

So not a dynamic optimizer bug after all.

Furthermore, you could actually get Valgrind to whine on a single iteration. Turned out to be a bad interaction between bind checks for the where and exit handlers. Fixed, and test in integration/weird-errors.t unfudged.

@p6rt p6rt closed this as completed Jun 10, 2015
@p6rt
Copy link
Author

p6rt commented Jun 10, 2015

@jnthn - Status changed from 'open' to 'resolved'

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