You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Jesse Wilson (JIRA)" <ji...@apache.org> on 2009/07/08 23:59:14 UTC
[jira] Created: (HARMONY-6264) Need a new native method:
VM.getStackClass()
Need a new native method: VM.getStackClass()
--------------------------------------------
Key: HARMONY-6264
URL: https://issues.apache.org/jira/browse/HARMONY-6264
Project: Harmony
Issue Type: Bug
Components: Classlib
Affects Versions: 5.0M10
Environment: SVN Revision: 785439
Reporter: Jesse Wilson
Priority: Minor
Attachments: getStackClass.patch
We need a new native method, VM.getStackClass(int) to compliment VM.getStackClassLoader() and Class.getStackClasses(). It needs to be implemented in the VM vendors. I can fix Android's Dalvik VM, but I'll need a Harmony volunteer to fix DRLVM.
Background:
To implement AtomicReferenceFieldUpdater securely, it's necessary to capture the class of the caller, not just the class loader of the caller. Otherwise a rogue class (say, EvilBufferedInputStream) could use an AtomicReferenceFieldUpdater to modify protected fields of arbitrary instances (such as the buffer field of somebody else's BufferedInputStream).
This blocks HARMONY-6262, which updates of our copy of java.util.concurrent to Doug Lea's latest. The getStackClass() call is needed for line 181 and its result is used on line 262:
http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/main/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java?annotate=1.41
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6264) Need a new native method:
VM.getStackClass()
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729516#action_12729516 ]
Alexey Varlamov commented on HARMONY-6264:
------------------------------------------
FYI, in DRLVM org.apache.harmony.vm.VMStack.getClasses() actually implements Class.getStackClasses(). I suppose a quick-fix could be done purely in Java using this method until someone volunteers to make performance-clean native implementation.
> Need a new native method: VM.getStackClass()
> --------------------------------------------
>
> Key: HARMONY-6264
> URL: https://issues.apache.org/jira/browse/HARMONY-6264
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M10
> Environment: SVN Revision: 785439
> Reporter: Jesse Wilson
> Priority: Minor
> Attachments: getStackClass.patch
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> We need a new native method, VM.getStackClass(int) to compliment VM.getStackClassLoader() and Class.getStackClasses(). It needs to be implemented in the VM vendors. I can fix Android's Dalvik VM, but I'll need a Harmony volunteer to fix DRLVM.
> Background:
> To implement AtomicReferenceFieldUpdater securely, it's necessary to capture the class of the caller, not just the class loader of the caller. Otherwise a rogue class (say, EvilBufferedInputStream) could use an AtomicReferenceFieldUpdater to modify protected fields of arbitrary instances (such as the buffer field of somebody else's BufferedInputStream).
> This blocks HARMONY-6262, which updates of our copy of java.util.concurrent to Doug Lea's latest. The getStackClass() call is needed for line 181 and its result is used on line 262:
> http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/main/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java?annotate=1.41
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6264) Need a new native method:
VM.getStackClass()
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Varlamov updated HARMONY-6264:
-------------------------------------
Component/s: DRLVM
Issue Type: New Feature (was: Bug)
> Need a new native method: VM.getStackClass()
> --------------------------------------------
>
> Key: HARMONY-6264
> URL: https://issues.apache.org/jira/browse/HARMONY-6264
> Project: Harmony
> Issue Type: New Feature
> Components: Classlib, DRLVM
> Affects Versions: 5.0M10
> Environment: SVN Revision: 785439
> Reporter: Jesse Wilson
> Priority: Minor
> Attachments: getStackClass.patch, getStackClass_Implementation.patch
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> We need a new native method, VM.getStackClass(int) to compliment VM.getStackClassLoader() and Class.getStackClasses(). It needs to be implemented in the VM vendors. I can fix Android's Dalvik VM, but I'll need a Harmony volunteer to fix DRLVM.
> Background:
> To implement AtomicReferenceFieldUpdater securely, it's necessary to capture the class of the caller, not just the class loader of the caller. Otherwise a rogue class (say, EvilBufferedInputStream) could use an AtomicReferenceFieldUpdater to modify protected fields of arbitrary instances (such as the buffer field of somebody else's BufferedInputStream).
> This blocks HARMONY-6262, which updates of our copy of java.util.concurrent to Doug Lea's latest. The getStackClass() call is needed for line 181 and its result is used on line 262:
> http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/main/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java?annotate=1.41
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HARMONY-6264) Need a new native method:
VM.getStackClass()
Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Hindess resolved HARMONY-6264.
-----------------------------------
Resolution: Fixed
Fix Version/s: 5.0M11
I've applied both patches in r793811. Please confirm that they have been applied as expected and close this JIRA. I'll move on to the concurrent updates shortly.
> Need a new native method: VM.getStackClass()
> --------------------------------------------
>
> Key: HARMONY-6264
> URL: https://issues.apache.org/jira/browse/HARMONY-6264
> Project: Harmony
> Issue Type: New Feature
> Components: Classlib, DRLVM
> Affects Versions: 5.0M10
> Environment: SVN Revision: 785439
> Reporter: Jesse Wilson
> Assignee: Mark Hindess
> Priority: Minor
> Fix For: 5.0M11
>
> Attachments: getStackClass.patch, getStackClass_Implementation.patch
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> We need a new native method, VM.getStackClass(int) to compliment VM.getStackClassLoader() and Class.getStackClasses(). It needs to be implemented in the VM vendors. I can fix Android's Dalvik VM, but I'll need a Harmony volunteer to fix DRLVM.
> Background:
> To implement AtomicReferenceFieldUpdater securely, it's necessary to capture the class of the caller, not just the class loader of the caller. Otherwise a rogue class (say, EvilBufferedInputStream) could use an AtomicReferenceFieldUpdater to modify protected fields of arbitrary instances (such as the buffer field of somebody else's BufferedInputStream).
> This blocks HARMONY-6262, which updates of our copy of java.util.concurrent to Doug Lea's latest. The getStackClass() call is needed for line 181 and its result is used on line 262:
> http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/main/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java?annotate=1.41
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6264) Need a new native method:
VM.getStackClass()
Posted by "Jesse Wilson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jesse Wilson updated HARMONY-6264:
----------------------------------
Attachment: getStackClass_Implementation.patch
Implements getStackClass() using an existing native method. Easy!
> Need a new native method: VM.getStackClass()
> --------------------------------------------
>
> Key: HARMONY-6264
> URL: https://issues.apache.org/jira/browse/HARMONY-6264
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M10
> Environment: SVN Revision: 785439
> Reporter: Jesse Wilson
> Priority: Minor
> Attachments: getStackClass.patch, getStackClass_Implementation.patch
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> We need a new native method, VM.getStackClass(int) to compliment VM.getStackClassLoader() and Class.getStackClasses(). It needs to be implemented in the VM vendors. I can fix Android's Dalvik VM, but I'll need a Harmony volunteer to fix DRLVM.
> Background:
> To implement AtomicReferenceFieldUpdater securely, it's necessary to capture the class of the caller, not just the class loader of the caller. Otherwise a rogue class (say, EvilBufferedInputStream) could use an AtomicReferenceFieldUpdater to modify protected fields of arbitrary instances (such as the buffer field of somebody else's BufferedInputStream).
> This blocks HARMONY-6262, which updates of our copy of java.util.concurrent to Doug Lea's latest. The getStackClass() call is needed for line 181 and its result is used on line 262:
> http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/main/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java?annotate=1.41
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6264) Need a new native method:
VM.getStackClass()
Posted by "Jesse Wilson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jesse Wilson updated HARMONY-6264:
----------------------------------
Attachment: getStackClass.patch
This only patches the classlib. Alongside this patch it is necessary to fix the DRLVM (and any other Harmony VMs)
> Need a new native method: VM.getStackClass()
> --------------------------------------------
>
> Key: HARMONY-6264
> URL: https://issues.apache.org/jira/browse/HARMONY-6264
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M10
> Environment: SVN Revision: 785439
> Reporter: Jesse Wilson
> Priority: Minor
> Attachments: getStackClass.patch
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> We need a new native method, VM.getStackClass(int) to compliment VM.getStackClassLoader() and Class.getStackClasses(). It needs to be implemented in the VM vendors. I can fix Android's Dalvik VM, but I'll need a Harmony volunteer to fix DRLVM.
> Background:
> To implement AtomicReferenceFieldUpdater securely, it's necessary to capture the class of the caller, not just the class loader of the caller. Otherwise a rogue class (say, EvilBufferedInputStream) could use an AtomicReferenceFieldUpdater to modify protected fields of arbitrary instances (such as the buffer field of somebody else's BufferedInputStream).
> This blocks HARMONY-6262, which updates of our copy of java.util.concurrent to Doug Lea's latest. The getStackClass() call is needed for line 181 and its result is used on line 262:
> http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/main/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java?annotate=1.41
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HARMONY-6264) Need a new native method:
VM.getStackClass()
Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Hindess reassigned HARMONY-6264:
-------------------------------------
Assignee: Mark Hindess
> Need a new native method: VM.getStackClass()
> --------------------------------------------
>
> Key: HARMONY-6264
> URL: https://issues.apache.org/jira/browse/HARMONY-6264
> Project: Harmony
> Issue Type: New Feature
> Components: Classlib, DRLVM
> Affects Versions: 5.0M10
> Environment: SVN Revision: 785439
> Reporter: Jesse Wilson
> Assignee: Mark Hindess
> Priority: Minor
> Attachments: getStackClass.patch, getStackClass_Implementation.patch
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> We need a new native method, VM.getStackClass(int) to compliment VM.getStackClassLoader() and Class.getStackClasses(). It needs to be implemented in the VM vendors. I can fix Android's Dalvik VM, but I'll need a Harmony volunteer to fix DRLVM.
> Background:
> To implement AtomicReferenceFieldUpdater securely, it's necessary to capture the class of the caller, not just the class loader of the caller. Otherwise a rogue class (say, EvilBufferedInputStream) could use an AtomicReferenceFieldUpdater to modify protected fields of arbitrary instances (such as the buffer field of somebody else's BufferedInputStream).
> This blocks HARMONY-6262, which updates of our copy of java.util.concurrent to Doug Lea's latest. The getStackClass() call is needed for line 181 and its result is used on line 262:
> http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/main/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java?annotate=1.41
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6264) Need a new native method:
VM.getStackClass()
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12730282#action_12730282 ]
Alexey Varlamov commented on HARMONY-6264:
------------------------------------------
Ah, indeed - this is even easier than I thought :)
> Need a new native method: VM.getStackClass()
> --------------------------------------------
>
> Key: HARMONY-6264
> URL: https://issues.apache.org/jira/browse/HARMONY-6264
> Project: Harmony
> Issue Type: New Feature
> Components: Classlib, DRLVM
> Affects Versions: 5.0M10
> Environment: SVN Revision: 785439
> Reporter: Jesse Wilson
> Priority: Minor
> Attachments: getStackClass.patch, getStackClass_Implementation.patch
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> We need a new native method, VM.getStackClass(int) to compliment VM.getStackClassLoader() and Class.getStackClasses(). It needs to be implemented in the VM vendors. I can fix Android's Dalvik VM, but I'll need a Harmony volunteer to fix DRLVM.
> Background:
> To implement AtomicReferenceFieldUpdater securely, it's necessary to capture the class of the caller, not just the class loader of the caller. Otherwise a rogue class (say, EvilBufferedInputStream) could use an AtomicReferenceFieldUpdater to modify protected fields of arbitrary instances (such as the buffer field of somebody else's BufferedInputStream).
> This blocks HARMONY-6262, which updates of our copy of java.util.concurrent to Doug Lea's latest. The getStackClass() call is needed for line 181 and its result is used on line 262:
> http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/main/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java?annotate=1.41
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.