JuliaCollections / JuliaCollections/DataStructures.jl
stackoverflow on comparisons for long linked lists
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 745
- Forks
- 261
- PR merge metrics
- No merged PRs in 30d
Description
== comparisons for linked lists use recursive implementation. Since julia does, as of now, not support tail call optimization, this will lead to stack overflow errors for long lists. To reproduce try this:
using DataStructures
l = nil(Float64)
n = 100_000
for i in 1:n
l = cons(rand(), l)
end
l2 = copy(l);
# this will crash
l == l2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the recursive == implementation for linked lists in DataStructures.jl and run the provided 100,000-element reproduction. Replace the stack-overflowing comparison behavior with an approach that handles long lists, and verify that comparing the copied lists completes successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100