github / github/codeql

ArrayIndexOutOfBoundsException in com.semmle.inmemory.pipeline.MetaPipelineInstance.wrapWithRaDump(MetaPipelineInstance.java:204)

Ouverte
#19,197 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
CodeQL
Étoiles
10.1k
Forks
2.1k
Merge moyen
2 j 15 h
PR mergées (30 j)
141

Description

java.lang.ArrayIndexOutOfBoundsException: Index 228617 out of bounds for length 202748
The RA to evaluate was:

{2} r1 = SCAN `SsaInternalsCommon::isUse/5#651d70a4` OUTPUT In.2, In.4
return r1

(eventual cause: ArrayIndexOutOfBoundsException "Index 228617 out of bounds for length 202748")
at com.semmle.inmemory.pipeline.MetaPipelineInstance.wrapWithRaDump(MetaPipelineInstance.java:204)
at com.semmle.inmemory.pipeline.MetaPipelineInstance.exceptionCaught(MetaPipelineInstance.java:174)
at com.semmle.inmemory.scheduler.execution.ThreadableWork.handleAndLog(ThreadableWork.java:593)
at com.semmle.inmemory.scheduler.execution.ThreadableWork.doSomeWork(ThreadableWork.java:410)
at com.semmle.inmemory.scheduler.IntensionalLayer$IntensionalWork.evaluate(IntensionalLayer.java:124)
at com.semmle.inmemory.scheduler.SimpleLayerTask$SimpleLayerWork.doWork(SimpleLayerTask.java:69)
at com.semmle.inmemory.scheduler.execution.ThreadableWork.doSomeWork(ThreadableWork.java:396)
at com.semmle.inmemory.scheduler.execution.ExecutionScheduler.runnerMain(ExecutionScheduler.java:707)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 228617 out of bounds for length 202748
at com.semmle.inmemory.relations.IntArraySorter.bsearchRange(IntArraySorter.java:689)
at com.semmle.inmemory.relations.IntArraySorter.bsearch(IntArraySorter.java:683)
at com.semmle.inmemory.relations.IntArraySorter.growRun(IntArraySorter.java:445)
at com.semmle.inmemory.relations.IntArraySorter.updateStack(IntArraySorter.java:299)
at com.semmle.inmemory.relations.IntArraySorter.sortAndDeliverCompletePages(IntArraySorter.java:141)
at com.semmle.inmemory.relations.writers.IntArrayWriter.sortAndDeliverCompletePages(IntArrayWriter.java:277)
at com.semmle.inmemory.relations.writers.UnsortedRelationWriter.makeSpaceIfNeeded(UnsortedRelationWriter.java:133)
at com.semmle.inmemory.relations.writers.UnsortedRelationWriter$1.addBatch(UnsortedRelationWriter.java:115)
at com.semmle.inmemory.pipeline.RelationWritingStep$RelationWritingState.processBatch(RelationWritingStep.java:90)
at com.semmle.inmemory.pipeline.SimpleStep$SimpleState.deliverBatch(SimpleStep.java:146)
at com.semmle.inmemory.pipeline.SimpleStep$SimpleState.deliverOwnBatch(SimpleStep.java:130)
at com.semmle.inmemory.pipeline.ExpanderStep$ExpanderState.deliverMatchOutput(ExpanderStep.java:85)
at com.semmle.inmemory.pipeline.LiteralStep$LiteralState.deliverRelation(LiteralStep.java:76)
at com.semmle.inmemory.pipeline.LiteralStep.deliverRelation(LiteralStep.java:161)
at com.semmle.inmemory.pipeline.LiteralStep$1.headEndWork(LiteralStep.java:141)
at com.semmle.inmemory.pipeline.HeadEndDispatcher.headEndWork(HeadEndDispatcher.java:75)
at com.semmle.inmemory.pipeline.PipelineState.doSomeWork(PipelineState.java:88)
at com.semmle.inmemory.pipeline.PipelineInstance.doWork(PipelineInstance.java:78)
at com.semmle.inmemory.scheduler.execution.ThreadableWork.doSomeWork(ThreadableWork.java:396)
at com.semmle.inmemory.scheduler.execution.ChainingWork.doWork(ChainingWork.java:30)
at com.semmle.inmemory.scheduler.execution.ThreadableWork.doSomeWork(ThreadableWork.java:396)
... 7 more

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start with MetaPipelineInstance.java at lines 204 and 174, then inspect IntArraySorter.java around lines 689, 683, 445, 299, and 141. Reproduce the reported RA evaluation for SsaInternalsCommon::isUse/5#651d70a4 and trace how the index exceeds the relation length. Done means the evaluation no longer raises ArrayIndexOutOfBoundsException, with coverage for the failure case.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java
Domaine
backend
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.