You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Julia Version 1.4.1Commit 381693d3df* (2020-04-14 17:20 UTC)Platform Info: OS: Linux (x86_64-pc-linux-gnu) CPU: Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-8.0.1 (ORCJIT, skylake)
Bug
When I try to apply ^ to a string more than one character long with an unsigned integer with value 0 (when trying to duplicate the string n (zero) times), it segfaults.
julia>"xx"^Int(0) # works""
julia>"xx"^UInt(2) # works"xxxx"
julia>"x"^UInt(0) # works""
julia>"xx"^UInt(0) # segfaults
signal (11): Segmentation fault
in expression starting at REPL[3]:0
unknown function (ip:0x7f7df8c8d369)
unknown function (ip:0x7f7df8eb8b0a)
unknown function (ip:0x7f7df8eb8ef4)
unknown function (ip:0x7f7e05c9b439)
unknown function (ip: (nil))
Allocations:962253 (Pool:961928; Big:325); GC:1
[1] 96359 segmentation fault (core dumped) julia
# Expected:""
The text was updated successfully, but these errors were encountered:
Currently the case where `r == 0` falls through the same logic as every
other non-negative value of `r` (aside from 1). This works for signed
integers. However, this does not work for unsigned integers: in the loop
where we unsafely fill in the output string, we're looping from 0 to `r
- 1`, which for unsigned integers wraps around and causes us to request
the address of the output string at a location that is well beyond what
was allocated.
Fixes#35578.
Currently the case where `r == 0` falls through the same logic as every
other non-negative value of `r` (aside from 1). This works for signed
integers. However, this does not work for unsigned integers: in the loop
where we unsafely fill in the output string, we're looping from 0 to `r
- 1`, which for unsigned integers wraps around and causes us to request
the address of the output string at a location that is well beyond what
was allocated.
Fixes#35578.
Currently the case where `r == 0` falls through the same logic as every
other non-negative value of `r` (aside from 1). This works for signed
integers. However, this does not work for unsigned integers: in the loop
where we unsafely fill in the output string, we're looping from 0 to `r
- 1`, which for unsigned integers wraps around and causes us to request
the address of the output string at a location that is well beyond what
was allocated.
Fixes#35578.
(cherry picked from commit 1dcb42f)
System & Version
uname
:Arch Linux 4.19.91-lts x86_64 GNU/Linux
versioninfo()
:Bug
When I try to apply
^
to a string more than one character long with an unsigned integer with value0
(when trying to duplicate the string n (zero) times), it segfaults.The text was updated successfully, but these errors were encountered: