Skip to content

StackOverflowError on get_backend(::UnitRange) #588

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
SouthEndMusic opened this issue Apr 12, 2025 · 0 comments · May be fixed by #602
Open

StackOverflowError on get_backend(::UnitRange) #588

SouthEndMusic opened this issue Apr 12, 2025 · 0 comments · May be fixed by #602
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@SouthEndMusic
Copy link

SouthEndMusic commented Apr 12, 2025

MRE:

julia> using KernelAbstractions # v0.9.34

julia> get_backend(1:3)
ERROR: StackOverflowError:
Stacktrace:
 [1] get_backend(A::UnitRange{Int64}) (repeats 79984 times)
   @ KernelAbstractions C:\Users\konin_bt\.julia\packages\KernelAbstractions\sWSE0\src\KernelAbstractions.jl:519

I can imagine that trying to obtain the backend of an UnitRange is not a useful thing to do, but this probably still isn't desirable behavior.

This issue looks similar to #366.

@SouthEndMusic SouthEndMusic changed the title StackOverflowError on get_backend(::UnitRange) StackOverflowError on get_backend(::UnitRange) Apr 12, 2025
@vchuravy vchuravy added bug Something isn't working good first issue Good for newcomers labels May 25, 2025
nsajko added a commit to nsajko/KernelAbstractions.jl that referenced this issue Jun 2, 2025
Prevent the `get_backend` methods from overflowing the stack/recurring
without bound.

Hoping this doesn't cause inference issues due to deeper call stacks.

Fixes JuliaGPU#588
nsajko added a commit to nsajko/KernelAbstractions.jl that referenced this issue Jun 2, 2025
Prevent the `get_backend` methods from overflowing the stack/recurring
without bound.

Hoping this doesn't cause inference issues due to deeper call stacks.

Fixes JuliaGPU#588
@nsajko nsajko linked a pull request Jun 2, 2025 that will close this issue
nsajko added a commit to nsajko/KernelAbstractions.jl that referenced this issue Jun 2, 2025
Prevent the `get_backend` methods from overflowing the stack/recurring
without bound.

Hoping this doesn't cause inference issues due to deeper call stacks.

Fixes JuliaGPU#588
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants