Testing long RCE

Rado Smogura mail at smogura.eu
Sat Dec 4 18:49:42 UTC 2021


Hi all,

I tried to test long range checks 8259609 - as this is long awaiting 
thing. I'm not sure if I do something wrong, but I can't get a good results


Approach 1.
LoopOverNonConstant.segment_loop change int to long as counter

AbstractMemorySegmentImpl.checkBounds I used followed code

if (length < 0) {
     throw outOfBoundException(offset, length);
}

Objects.checkIndex(offset, this.length - (length - 1));

Results were like Iteration   8: 0.376 ms/op


Approach 2

AbstractMemorySegmentImpl.checkBounds use code like in 1, but without segment_loop changes

Iteration   8: 0.239 ms/op

Approach 3 - original test
Iteration   8: 0.230 ms/op

Sorry for not posting whole results (just grabbed partial results). In graph as well I can see number of range checks in main loop :(

Kind regards,
Rado



More information about the panama-dev mailing list