Possible bug in `inlinestrings` for length-1 strings
nilshg opened this issue · comments
Nils Gudat commented
Reported on Slack:
julia> using InlineStrings
julia> @time inlinestrings(fill("abcde", 1_000_000));
0.005492 seconds (5 allocations: 15.259 MiB)
julia> @time inlinestrings(fill("ab", 1_000_000));
0.005419 seconds (5 allocations: 11.444 MiB)
julia> @time inlinestrings(fill("a", 1_000_000));
ERROR: StackOverflowError:
Kristoffer had a look and his take was:
It recurses here
until the stack runs out.InlineStrings.jl/src/InlineStrings.jl
Line 869 in 2a0a33c
The reason is this check:
InlineStrings.jl/src/InlineStrings.jl
Line 859 in 2a0a33c
sizeof(y) < sizeof(eT)
is false wheny == "a"
and eT == String1