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

segfault with moar with specific PERL6LIB and running a specific test file #3533

Closed
p6rt opened this issue Sep 24, 2014 · 6 comments
Closed

Comments

@p6rt
Copy link

p6rt commented Sep 24, 2014

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

Searchable as RT122842$

@p6rt
Copy link
Author

p6rt commented Sep 24, 2014

From @usev6

I get a segmentation fault with moar when I run the following command (tested on Debian 7 and FreeBSD 10.0)​:

$ PERL6LIB=$(pwd)/lib​:. ./perl6-m t/spec/S05-transliteration/trans.rakudo.moar
1..60
ok 1 - Each side can be individual characters
ok 2 - The two sides of the any pair can be strings interpreted as tr/// would multichar
ok 3 - The two sides of the any pair can be strings interpreted as tr/// would range
ok 4 - If the first character is a dash it isn't part of a range
Segmentation fault

Other values for PERL6LIB ('lib​:.' or '/path/to/rakudo/lib​:/path/to/rakudo) seem to work​: http://pastebin.com/cAzk213S

Also setting MVM_SPESH_INLINE_DISABLE=1 avoids the segfault as FROGGS pointed out (link below)​:
$ PERL6LIB=$(pwd)/lib​:. MVM_SPESH_INLINE_DISABLE=1 ./perl6-m t/spec/S05-transliteration/trans.rakudo.moar
[... runs as expected, no segfault]

For further discussion see http://irclog.perlgeek.de/perl6/2014-09-24#i_9403093

@p6rt
Copy link
Author

p6rt commented Sep 25, 2014

From @usev6

I tried to narrow the problem down, but was not very successful.

With the attached file "trans.t" I can reproduce the segfault​:

$ PERL6LIB=$(pwd)/lib​:. ./perl6-m trans.t
alive
Segmentation fault

If I remove some variable declarations or the last say in that file, the segfault goes away. Even changing the quotation (s/'/"/g or s/"/'/g) avoids the segfault.

(On a second system I had to declare some more empty variables to get a segfault. But otherwise it behaves identically.)

@p6rt
Copy link
Author

p6rt commented Sep 25, 2014

From @usev6

use v6;
use Test;

'ABC'.trans( ('A'=>'a'), ('B'=>'b'), ('C'=>'c') );

'XYZ'.trans( ('XYZ' => 'xyz') );

'ABC-DEF'.trans( ('- A..Z' => '_ a..z') );

my ($var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10);
my ($var11,$var12,$var13,$var14,$var15,$var16,$var17);
say "alive"; ## no segfault when commenting this line or not declaring one of those variables

@p6rt
Copy link
Author

p6rt commented Oct 2, 2014

1 similar comment
@p6rt
Copy link
Author

p6rt commented Oct 2, 2014

@p6rt p6rt closed this as completed Oct 2, 2014
@p6rt
Copy link
Author

p6rt commented Oct 2, 2014

@usev6 - Status changed from 'new' 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