typelevel / typelevel/cats-effect

`ArrayIndexOutOfBoundsException` in `ByteStack`

Open
#3,907 3 comments 0 reactions 0 assignees View on GitHub

@durban is already working on this.

Since Jan 13, 2024.

  • #3949 by @durban — open
:beetle: bug
Dominant language
Scala
Stars
2.2k
Forks
576
Avg merge
2d 11h
Merged PRs (30d)
18

Description

Look I don't even know…

java.lang.ArrayIndexOutOfBoundsException: Index -268435455 out of bounds for length 402653184
  | => tat cats.effect.ByteStack$.push(ByteStack.scala:59)
	at cats.effect.IOFiber.runLoop(IOFiber.scala:560)
	at cats.effect.IOFiber.autoCedeR(IOFiber.scala:1439)
	at cats.effect.IOFiber.run(IOFiber.scala:119)
	at cats.effect.unsafe.WorkerThread.run(WorkerThread.scala:743)

See DispatcherSpec on the aioobe-reproduction tag at https://github.com/djspiewak/cats-effect

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ByteStack.push frame in ByteStack.scala:59, then run DispatcherSpec using the aioobe-reproduction tag as described. Trace the reproduction through IOFiber and confirm that it no longer produces the reported ArrayIndexOutOfBoundsException.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.