-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Segfault when calling string repeat with negative argument #15482
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Since |
I don't think this is a bug, it's just a run of the mill out-of-memory error. #14165 covers adding a warning for this case. |
It's actually a dup of #15123 |
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Aug 21, 2023
fix: avoid problematic serde release serde 1.0.172 and up rely on opaque non-reproducible binary blobs to function, explicitly not providing a library-level opt-out. This is problematic for two reasons: - directly, unauditable binary blobs are a security issue. - indirectly, it becomes much harder to predict future behaviors of the crate. As such, I am willing to go on a limb here and forbid building rust-analyzer with those versions of serde. Normally, my philosophy is to defer the choice to the end user, but it's also a design constraint of rust-analyzer that we don't run random binaries downloaded from the internet without explicit user's concent. Concretely, this upper-bounds serde for both rust-analyzer workspace, as well as the lsp-server lib. See serde-rs/serde#2538 for wider context.
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
I was writing some code to pad strings, and if I pass in a negative number of spaces to add, it compiles fine but segmentation faults at runtime. The following code is enough to trigger it:
The text was updated successfully, but these errors were encountered: