I just glanced at this and that AIOOBE is from accessing the element in a for loop:
for (inti = 0; i < eventHooks.length; i++) {
EventHookeventHook = eventHooks[i];
So what is happening in this bug is that in the for i = 0 and eventHooks.length == 1 but then by eventHooks[i] access the eventHook is gone (probably from an event hook being disabled. I have to think this is because multiple threads are enabling/disabling tracepoints.
It is definitely a bug but I will see if I can make a trivial repro or not...
as @kares said. If we fix this on 9.2.x it will not be backported to 9.1.x so you will either a) patch your own release on 9.1.17.0 or entertain b) 9.2.9.0 (assuming there is a simple fix)
Unfortunately no simple, reproducible case at the moment (the application this occurs in is large and complex) and on an older version of JRuby.
Environment
Provide at least:
jruby 9.1.17.0 (2.3.3) 2018-04-20 d8b1ff9 Java HotSpot(TM) 64-Bit Server VM 25.221-b11 on 1.8.0_221-b11 +jit [darwin-x86_64]
--debug
flag forTracePoint
supportDarwin MacBook-Pro.local 18.7.0 Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64
Expected Behavior
Without using
TracePoint
, noArrayIndexOutOfBoundsException
exceptions are thrown.Actual Behavior
Exceptions when using
TracePoint.new(:line)
The text was updated successfully, but these errors were encountered: