We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I got this while trying to overwrite the getindex function in BitBasis.jl, it can be re-produced by the following code
getindex
using BitBasis struct SubBit{T, L} parent::BitStr{T, L} index::Int end Base.getindex(x::BitStr, index::Int) = SubBit(x, index)
Then type
bit"101"[1]
in REPL will get this segmentation fault. Not sure why, if I remove the overloading of getindex inside BitBasis then it is fine.
BitBasis
versioninfo
julia> versioninfo() Julia Version 1.1.0 Commit 80516ca202 (2019-01-21 21:24 UTC) Platform Info: OS: macOS (x86_64-apple-darwin18.5.0) CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-6.0.1 (ORCJIT, skylake) Environment: JULIA_EDITOR = code
The text was updated successfully, but these errors were encountered:
This is what I get on Julia 1.0, 1.1, 1.2 and master:
julia> bit"101"[1] SubBit{Int64,3}(101 (5), 1)
Sorry, something went wrong.
strange, I can still repeat this segmentfault on my laptop
what's your versioninfo()? maybe a Mac OS issue? Or try using BitBasis#master ?
versioninfo()
using BitBasis#master
Looks like a duplicate of #28577 (stack overflow may lead to segfault), since you appear to have defined that show(io, x::SubBit) = show(io, x)
show(io, x::SubBit) = show(io, x)
Oh I see. Yes, it is a dup of it. Thanks!
No branches or pull requests
I got this while trying to overwrite the
getindex
function in BitBasis.jl, it can be re-produced by the following codeThen type
in REPL will get this segmentation fault. Not sure why, if I remove the overloading of
getindex
insideBitBasis
then it is fine.versioninfo
The text was updated successfully, but these errors were encountered: