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

Null PMC access on grammar match object #1992

Closed
p6rt opened this issue Jul 31, 2010 · 6 comments
Closed

Null PMC access on grammar match object #1992

p6rt opened this issue Jul 31, 2010 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Jul 31, 2010

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

Searchable as RT76884$

@p6rt
Copy link
Author

p6rt commented Jul 31, 2010

From @tadzik

The following code​:

  grammar grr {
  token TOP {
  <line>*
  }
  token line { .* \n }
  }
 
  my $match = grr.parse('foo bar asd');
  unless $match {
  die 'oh noes!'
  }
  say $match[0].perl;

Results in the following behaviour​:

  Null PMC access in find_method('perl')
  in <anon> at line 1202​:CORE.setting
  in 'Any​::join' at line 1
  in 'Mu​::attribs' at line 1203​:CORE.setting
  in 'Mu​::perl' at line 1207​:CORE.setting
  in main program body at line 14​:parser.pl

Whereas it should it should return a failure, for there is no $match[0]

@p6rt
Copy link
Author

p6rt commented Aug 12, 2010

@coke - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Oct 3, 2011

From @coke

On Sat Jul 31 16​:36​:28 2010, tadzikes@​gmail.com wrote​:

The following code​:

grammar grr {
token TOP {
<line>*
}
token line { .* \n }
}

my $match = grr.parse('foo bar asd');
unless $match {
die 'oh noes!'
}
say $match[0].perl;

Results in the following behaviour​:

Null PMC access in find_method('perl')
in <anon> at line 1202​:CORE.setting
in 'Any​::join' at line 1
in 'Mu​::attribs' at line 1203​:CORE.setting
in 'Mu​::perl' at line 1207​:CORE.setting
in main program body at line 14​:parser.pl

Whereas it should it should return a failure, for there is no $match[0]

This now outputs​:
Any

It's been over a year since the original report; is this the new correct?

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Apr 5, 2012

From @jnthn

On Mon Oct 03 11​:47​:34 2011, coke wrote​:

On Sat Jul 31 16​:36​:28 2010, tadzikes@​gmail.com wrote​:

The following code​:

grammar grr {
token TOP {
<line>*
}
token line { .* \n }
}

my $match = grr.parse('foo bar asd');
unless $match {
die 'oh noes!'
}
say $match[0].perl;

Results in the following behaviour​:

Null PMC access in find_method('perl')
in <anon> at line 1202​:CORE.setting
in 'Any​::join' at line 1
in 'Mu​::attribs' at line 1203​:CORE.setting
in 'Mu​::perl' at line 1207​:CORE.setting
in main program body at line 14​:parser.pl

Whereas it should it should return a failure, for there is no $match[0]

This now outputs​:
Any

It's been over a year since the original report; is this the new correct?

Looks like. Tagging testneeded.

/jnthn

@p6rt
Copy link
Author

p6rt commented Mar 15, 2013

From @timo

test committed in roast​: e143018

@p6rt
Copy link
Author

p6rt commented Mar 15, 2013

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

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

No branches or pull requests

1 participant