Reading beyond the trace limit yields strange exception
Closed this issue · 0 comments
Siebje commented
Provided the total number of traces in a trace set is N:
Requesting trace N (correctly) yields the following exception:
java.lang.IllegalArgumentException: Requested trace index (N) is larger than the total number of available traces (N).
at com.riscure.trs.TraceSet.get(TraceSet.java:135)
However, requesting trace N+1 yields the following exception:
java.lang.IllegalArgumentException: Negative size
at java.base/sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:943)
at com.riscure.trs.TraceSet.mapBuffer(TraceSet.java:96)
at com.riscure.trs.TraceSet.moveBufferIfNecessary(TraceSet.java:108)
at com.riscure.trs.TraceSet.get(TraceSet.java:129)