mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-02 22:55:26 +02:00
[229606] - [concurrency] NegativeArraySizeException when launching with enabled assertions
This commit is contained in:
parent
2f40ba594e
commit
36d8ba04ce
1 changed files with 2 additions and 0 deletions
|
@ -167,6 +167,8 @@ public class DefaultDsfExecutor extends ScheduledThreadPoolExecutor
|
|||
*/
|
||||
TracingWrapper(int offset) {
|
||||
StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
|
||||
// guard against the offset being greater than the stack trace
|
||||
offset = Math.min(offset, stackTrace.length);
|
||||
fSubmittedAt = new StackTraceWrapper(new StackTraceElement[stackTrace.length - offset]);
|
||||
System.arraycopy(stackTrace, offset - 1, fSubmittedAt.fStackTraceElements, 0, fSubmittedAt.fStackTraceElements.length);
|
||||
if (isInExecutorThread() && fCurrentlyExecuting != null) {
|
||||
|
|
Loading…
Add table
Reference in a new issue