-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
empty!(::WeakKeyDict) throws error #18204
Comments
dbeach24
changed the title
empty!(::WeakKeyDict) throws error
Aug 23, 2016
empty!(::WeakKeyDict)
throws error
On 0.6 this seems to work now. On 0.5, this actually segfaults when there is an non-empty dict: julia> x = WeakKeyDict()
WeakKeyDict{Any,Any} with 0 entries
julia> x[BigFloat(1)] = 1
1
julia> empty!(x)
signal (11): Segmentation fault
while loading no file, in expression starting on line 0
unknown function (ip: 0x7fbe65b5dd0e)
decompose at ./hashing2.jl:140
hash at ./hashing2.jl:32
hashindex at ./dict.jl:441 [inlined]
ht_keyindex at ./dict.jl:536
delete! at ./dict.jl:736 [inlined]
#374 at ./weakkeydict.jl:49
lock at ./lock.jl:101
#356 at ./weakkeydict.jl:15
jl_call_method_internal at /home/mauro/julia/julia-0.5/src/julia_internal.h:189 [inlined]
... Worth a back-port? (Not for me, I don't use it) |
It's just a matter of backporting that PR but without using a testset, right? |
I think so. |
Unless you plan on running pkgeval on backports, I'll get it. |
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Demonstration:
I found this while reading the source (line 49 of base/weakkeydict.jl):
Probably was meant to be:
The text was updated successfully, but these errors were encountered: