Skip to content
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

Some sort of memory error in random number generation #1

Closed
Keno opened this issue Aug 29, 2019 · 2 comments
Closed

Some sort of memory error in random number generation #1

Keno opened this issue Aug 29, 2019 · 2 comments

Comments

@Keno
Copy link

Keno commented Aug 29, 2019

julia> xs = rand(Float80, 10000)
ERROR: ReadOnlyMemoryError()
Stacktrace:
 [1] setindex! at ./array.jl:780 [inlined]
 [2] rand! at /Users/kfischer/Projects/julia-doublecheck/usr/share/julia/stdlib/v1.4/Random/src/Random.jl:268 [inlined]
 [3] rand! at /Users/kfischer/Projects/julia-doublecheck/usr/share/julia/stdlib/v1.4/Random/src/Random.jl:264 [inlined]
 [4] rand(::Random.MersenneTwister, ::Type{Float80}, ::Tuple{Int64}) at /Users/kfischer/Projects/julia-doublecheck/usr/share/julia/stdlib/v1.4/Random/src/Random.jl:285
 [5] rand at /Users/kfischer/Projects/julia-doublecheck/usr/share/julia/stdlib/v1.4/Random/src/Random.jl:286 [inlined]
 [6] rand(::Type{Float80}, ::Int64) at /Users/kfischer/Projects/julia-doublecheck/usr/share/julia/stdlib/v1.4/Random/src/Random.jl:289
 [7] top-level scope at REPL[2]:1
@rfourquet
Copy link
Owner

I get a segmentation fault. But I don't think this is related to RNG, when I try to write a fixed value to each position of Array{Float80}(undef, 10000), I get a corrupted size vs. prev_size error followed by an abort signal sent. I believe it's caused by a Julia bug with arrays of eltype of size not-a-power-of-two, cf. JuliaLang/julia#29053.

@rfourquet
Copy link
Owner

Fixed by JuliaLang/julia#33283.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants