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

InvalidArgumentException when creating a large hash with => #3286

Closed
p6rt opened this issue Dec 2, 2013 · 8 comments
Closed

InvalidArgumentException when creating a large hash with => #3286

p6rt opened this issue Dec 2, 2013 · 8 comments
Labels
JVM Related to Rakudo-JVM testcommitted

Comments

@p6rt
Copy link

p6rt commented Dec 2, 2013

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

Searchable as RT120656$

@p6rt
Copy link
Author

p6rt commented Dec 2, 2013

From dvj@dagur.com

21​:51 <dagurval> r​: my @​a = ^512; my %b = @​a; my %c = eval %b.perl;
21​:51 <camelia> rakudo-jvm 874e35​:
OUTPUT«java.lang.IllegalArgumentException​: bad
  parameter count 259␤ in block at eval_0​:1␤ in sub eval at
  gen/jvm/CORE.setting​:684␤ in block at /tmp/0ovfYy8OzU​:1␤
in any
  eval at gen/jvm/stage2/NQPHLL.nqp​:1086␤ in any evalfiles at
  gen/jvm/stage2/NQP…»
21​:51 <camelia> ..rakudo-parrot 874e35​: ( no output )

Note that the output of %b.perl uses =>

Creating a large hash using , works.

@p6rt
Copy link
Author

p6rt commented Sep 8, 2014

From @coke

On Sun Dec 01 22​:30​:31 2013, dagur wrote​:

21​:51 <dagurval> r​: my @​a = ^512; my %b = @​a; my %c = eval %b.perl;
21​:51 <camelia> rakudo-jvm 874e35​:
OUTPUT«java.lang.IllegalArgumentException​: bad
parameter count 259␤ in block at eval_0​:1␤ in sub eval at
gen/jvm/CORE.setting​:684␤ in block at /tmp/0ovfYy8OzU​:1␤
in any
eval at gen/jvm/stage2/NQPHLL.nqp​:1086␤ in any evalfiles at
gen/jvm/stage2/NQP…»
21​:51 <camelia> ..rakudo-parrot 874e35​: ( no output )

Note that the output of %b.perl uses =>

Creating a large hash using , works.

Current behavior on the JVM is that this chews up 6.5 CPUs or so for at least 10s of minutes.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Sep 8, 2014

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

@p6rt
Copy link
Author

p6rt commented Mar 4, 2015

From @donaldh

I think this can be closed.

my @​a = ^500; my %b = @​a; my %c = EVAL('%b.perl')
Odd number of elements found where hash initializer expected
  in block at gen/jvm/CORE.setting​:11170

and

my @​a = ^500; my %b = @​a; my %c = EVAL('%b')

works just fine.

@p6rt
Copy link
Author

p6rt commented Mar 10, 2015

From @usev6

Hm, looks like I can reproduce the original problem with manually building a string and feeding it to EVAL​:

$ perl6-j -e 'my $foo; for ^512 -> $n, $k { $foo ~= "$n => $k, " }; $foo ~~ s/", "$//; my %c = EVAL($foo); say %c.elems'
java.lang.IllegalArgumentException​: bad parameter count 259
  in block <unit> at EVAL_0​:1
  in any <unit-outer> at EVAL_0​:1
  in sub EVAL at gen/jvm/CORE.setting​:782
  in block <unit> at -e​:1

As in the initial bug report there is no problem when I replace "=>" with ";"​:

$ perl6-j -e 'my $foo; for ^512 -> $n, $k { $foo ~= "$n, $k, " }; $foo ~~ s/", "$//; my %c = EVAL($foo); say %c.elems'
256

@p6rt
Copy link
Author

p6rt commented Sep 10, 2017

From @usev6

There is no InvalidArgumentException anymore. I've added a test to S32-hash/perl.6 with commit Raku/roast@bae1108d8f.

I'm closing this ticket as 'resolved'.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Sep 10, 2017

From @usev6

There is no InvalidArgumentException anymore. I've added a test to S32-hash/perl.6 with commit Raku/roast@bae1108d8f.

I'm closing this ticket as 'resolved'.

@p6rt
Copy link
Author

p6rt commented Sep 10, 2017

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

@p6rt p6rt closed this as completed Sep 10, 2017
@p6rt p6rt added JVM Related to Rakudo-JVM testcommitted labels Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JVM Related to Rakudo-JVM testcommitted
Projects
None yet
Development

No branches or pull requests

1 participant