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

Segfault in lpad with UInt64 length #32160

Closed
c42f opened this issue May 27, 2019 · 1 comment · Fixed by #32161
Closed

Segfault in lpad with UInt64 length #32160

c42f opened this issue May 27, 2019 · 1 comment · Fixed by #32161
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@c42f
Copy link
Member

c42f commented May 27, 2019

On the official linux 1.1.0 build (also behaves the same in a recent 1.3-DEV):

julia> lpad("x", UInt64(1), " ")
"x"

julia> lpad("xx", UInt64(1), " ")

signal (11): Segmentation fault
in expression starting at no file:0
Segmentation fault (core dumped)

Originally reported on discourse: https://discourse.julialang.org/t/exception-access-violation-in-windows64/24660/2

@c42f c42f added the bug Indicates an unexpected problem or unintended behavior label May 27, 2019
@c42f
Copy link
Member Author

c42f commented May 27, 2019

The logic of lpad/rpad is wrong for unsigned conversions, but this just further exposes the following:

julia> repeat('x', UInt64(0)-1)

signal (11): Segmentation fault
in expression starting at no file:0
Segmentation fault (core dumped)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant