-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Unsound unsafe usages #15020
Comments
#12653 is not related. It is related to FFI, which is inherently unsound.
Correct, which is why we don't do that. We create a fixed size uninitialized contiguous chunk of memory, then initialize it, and only once it is initialize it treat it as safe. Did you take a look at the Same goes for cases of I am going to close this issue, because it is not actionable. You are pointing out |
The |
Some seemingly related writings on the serde
|
Can you point what is wrong with these comments? |
It is not safe to create
And the last one:
|
Thanks, if you'd like to contribute and fix these problem that would be highly appreciated. |
FWIW rust-lang/unsafe-code-guidelines#71 is about by-value integers/floats. Indeed |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
clippy::mut_from_ref
deno/core/ops_metrics.rs
Lines 56 to 62 in 4e92f38
It is not safe to create
&mut [u8]
which is pointing to uninitialized memory.See also rust-lang/unsafe-code-guidelines#71
deno/ext/net/ops_tls.rs
Lines 378 to 382 in 4e92f38
deno/serde_v8/de.rs
Lines 679 to 692 in 4e92f38
deno/serde_v8/de.rs
Lines 708 to 720 in 4e92f38
clippy::uninit_vec
deno/serde_v8/magic/bytestring.rs
Lines 52 to 66 in 4e92f38
deno/serde_v8/magic/u16string.rs
Lines 35 to 49 in 4e92f38
deno/snapshots/lib.rs
Lines 30 to 53 in 4e92f38
What is this?
deno/serde_v8/magic/value.rs
Lines 30 to 48 in 4e92f38
Related (maybe):
ZeroCopyBuf
andMagicBuffer
should not beSend
orSync
deno_core#129The text was updated successfully, but these errors were encountered: