RFR (XS) 8011048 - reading from unmapped memory in UTF8::as_quoted_ascii()

Yumin Qi yumin.qi at oracle.com
Mon Apr 1 00:02:28 PDT 2013


This looks good.

Yumin

On 3/31/2013 7:54 PM, Ioi Lam wrote:
> Please review a very small fix:
>
> http://cr.openjdk.java.net/~iklam/8011048/utf8_read_past_end_001/ 
> <http://cr.openjdk.java.net/%7Eiklam/8011048/utf8_read_past_end_001/>
>
> Bug: Possible reading from unmapped memory in UTF8::as_quoted_ascii()
>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8011048
> https://jbs.oracle.com/bugs/browse/JDK-8011048
>
> Summary of fix:
>
>     The old code would read 1 byte past the end of the buffer with the
>     "while (*p != '\0')" loop, because the UTF8 string embedded in a 
> Symbol
>     is not 0-terminated.
>
>     The fix is to add a utf8_length parameter to UTF8::as_quoted_ascii().
>
> Tests:
>
>     JPRT
>     UTE (vm.runtime.testlist, vm.quick.testlist, 
> vm.parallel_class_loading.testlist)
>
> Thanks
> - Ioi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20130401/c9939dd6/attachment.html 


More information about the hotspot-runtime-dev mailing list