On 2/15/2012 2:34 AM, David Holmes wrote:
On 15/02/2012 7:20 AM, keith mcguigan wrote:

Well, ok, I guess it's not the smallest code change -- I think I've
matched this before -- but I guarantee you won't see one smaller than
this!

It's a one-liner (a one-character-er) to accept 0 as a successful return
from an ioctl() call, for registering dtrace providers.

http://cr.openjdk.java.net/~kamg/7145589/webrev.00/

Have to ask - why have we not noticed this before? No test coverage?

Not really sure. I suspect testing missed this somehow, but there are scenarios where this would work fine.

Basically, this would fail only when the JSDT provider was the very first dtrace provider registered with the system for the current process. In the past, the JVM probes were registered automatically at load time, so any JSDT providers were not "first". When the JVM probes were switched to lazy loading (a relatively recent change), this opened the door for this error. Similarly, if any loaded library loaded probes before trying to create the JSDT provider, that would also mask this bug. So it's possible that this was somehow hidden from our testing configurations.

--
- Keith

Reply via email to