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

ArrayIndexOutOfBoundsException when utf8 string matched against regexp with with word boundary \b #3397

Closed
kml opened this Issue Oct 15, 2015 · 6 comments

Comments

Projects
None yet
4 participants
@kml

kml commented Oct 15, 2015

> p = "x".force_encoding("utf-8"); p.match(/x.*\b/)
Java::JavaLang::ArrayIndexOutOfBoundsException: 1
    from org.jcodings.specific.UTF8Encoding.length(UTF8Encoding.java:35)
    from org.jcodings.specific.BaseUTF8Encoding.mbcToCode(BaseUTF8Encoding.java:91)
    from org.jcodings.specific.UTF8Encoding.mbcToCode(UTF8Encoding.java:24)
    from org.jcodings.Encoding.isMbcWord(Encoding.java:469)
    from org.joni.ByteCodeMachine.opWordBound(ByteCodeMachine.java:1054)
    from org.joni.ByteCodeMachine.matchAt(ByteCodeMachine.java:239)
    from org.joni.Matcher.matchCheck(Matcher.java:304)
?> p = "x".bytes.to_a.pack('c*').force_encoding("utf-8"); p.match(/x.*\b/)
=> nil
@lopex

This comment has been minimized.

Show comment
Hide comment
@lopex

lopex Oct 15, 2015

Member

Fixed in 5a13be3

Member

lopex commented Oct 15, 2015

Fixed in 5a13be3

@lopex lopex closed this Oct 15, 2015

@kml

This comment has been minimized.

Show comment
Hide comment
@kml

kml Oct 16, 2015

Thanks for fixing. How can I get link to commit?
It would be very helpfull if this could get to next 1.7 release also.

kml commented Oct 16, 2015

Thanks for fixing. How can I get link to commit?
It would be very helpfull if this could get to next 1.7 release also.

@kml

This comment has been minimized.

Show comment
Hide comment

kml referenced this issue in jruby/joni Oct 16, 2015

@enebo enebo added this to the JRuby 9.0.3.0 milestone Oct 21, 2015

@Xanthus

This comment has been minimized.

Show comment
Hide comment
@Xanthus

Xanthus Jan 13, 2016

Is this going to make it into the next 1.7 release?

Xanthus commented Jan 13, 2016

Is this going to make it into the next 1.7 release?

@enebo

This comment has been minimized.

Show comment
Hide comment
@enebo

enebo Jan 13, 2016

Member

@Xanthus @kml This will be in the next 1.7 release this week. I just updated our companion projects which contained the fixes.

Member

enebo commented Jan 13, 2016

@Xanthus @kml This will be in the next 1.7 release this week. I just updated our companion projects which contained the fixes.

@Xanthus

This comment has been minimized.

Show comment
Hide comment
@Xanthus

Xanthus Jan 14, 2016

Great stuff, thanks!
On Wed, 13 Jan 2016 at 23:30, Thomas E Enebo notifications@github.com
wrote:

@Xanthus https://github.com/Xanthus @kml https://github.com/kml This
will be in the next 1.7 release this week. I just updated our companion
projects which contained the fixes.


Reply to this email directly or view it on GitHub
#3397 (comment).

Xanthus commented Jan 14, 2016

Great stuff, thanks!
On Wed, 13 Jan 2016 at 23:30, Thomas E Enebo notifications@github.com
wrote:

@Xanthus https://github.com/Xanthus @kml https://github.com/kml This
will be in the next 1.7 release this week. I just updated our companion
projects which contained the fixes.


Reply to this email directly or view it on GitHub
#3397 (comment).

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