logo

Rust crates reviews

Cryptographically verifiable, distributed dependency reviews

crate: ascii

https://lib.rs/crates/ascii/

Add the last reviewed version to Cargo.toml / [dependencies]:

ascii = "0.9.2"

Filter reviews clicking on the numbers in the summary.

Full column names in tooltip hints: rating Negative, rating Neutral, rating Positive, rating Strong, thoroughness, understanding, reviews count.

Neg
Neu
Pos
Str
tho
und
rev
4
4
crate version
rating
date
reviewer
thoroughness, understanding
ascii 0.9.2
negative
2019-07-29
none, high

UNSOUND: https://github.com/tomprogrammer/rust-ascii/issues/64 (I didn't cath this one)
unsound? https://github.com/tomprogrammer/rust-ascii/issues/65

Lots of repeated unsafe.
No debug_assert! s for uncheck codepaths.
Unsound test code assumes gen_range meets it's safe API contract.
Not fully reviewed.

Detail

FileRatingNotes
src/serialization/ascii_char.rs+1thoroughness: low, understanding: high throughout
src/serialization/ascii_str.rs+1
src/serialization/ascii_string.rs+1
src/serialization/mod.rs+1
src/ascii_char.rs0unsound test code?
src/ascii_str.rs-1UNSOUND - missing #[repr(transparent)]` !
src/ascii_string.rsN/AUnreviewed
src/free_functions.rsN/A
src/lib.rsN/A
.gitignoreN/A
.travis.ymlN/A
Cargo.toml+1
Cargo.toml.orig+1
LICENSE-APACHEN/A
LICENSE_MITN/A
README.mdN/A
RELEASES.mdN/A
tests.rsN/A
OtherRatingNotes
unsafe-1UNSOUND, disappointing lack of debug_assert!s.
fs+1?Not present?
io+1?Not present?
docs+1?
tests+1?

src/ascii_char.rs

LineNotes
22This must contain every value between 0..=127 for soundness guarantees bellow.
476unsafe { ... } - looks sound. case 1 handles 32..=126, case 2 handles 127, case 3 handles 0..=31. Not wild about this impl but looks valid. See https://en.wikipedia.org/wiki/Control_Pictures
498unsafe { ... } - looks sound. 'a' > 'A'
509unsafe { ... } - looks sound.
548unsafe { ... } - looks sound. Duplicate logic, annoyingly.
557unsafe { ... } - looks sound. Duplicate logic, annoyingly.
659unsafe fn - looks good.
670unsafe fn - disappointing lack of debug_assert!
678unsafe { ... } - looks sound.
686unsafe fn - disappointing lack of debug_assert!. transmute from u8 to #[repr(u8)] enum... I believe that's sound.
694unsafe { ... } - looks sound.
702unsafe fn - looks sound.
714UNSOUND TEST CODE? no guarantee generic Gen actually generates within range. Gated behind "quickcheck" feature.
735UNSOUND TEST CODE? no guarantee generic Gen actually generates within range. Gated behind "quickcheck" feature.

src/ascii_str.rs

LineNotes
116unsafe fn - looks good.
352UNSOUND unsafe { ... } - AsciiStr is not #[repr(transparent)] !
359UNSOUND unsafe { ... } - AsciiStr is not #[repr(transparent)] !
367UNSOUND unsafe { ... } - AsciiStr is not #[repr(transparent)] !
384scary transmuting impl_into! macro, audit all uses carefully
390UNSOUND unsafe { ... } - AsciiStr is not #[repr(transparent)] !
397UNSOUND unsafe { ... } - AsciiStr is not #[repr(transparent)] !
405UNSOUND unsafe { ... } - AsciiStr is not #[repr(transparent)] !
410I believed these invokes would be sound if AsciiStr was #[repr(transparent)], but https://github.com/tomprogrammer/rust-ascii/issues/64 proved me wrong.
668unsafe fn - looks good.
676unsafe fn - looks good.
689unsafe fn - looks good.
701unsafe fn - looks good.
713unsafe fn - looks good.
724unsafe fn - looks good.
734unsafe fn - looks good.
746unsafe fn - looks good.
756unsafe fn - looks good.
764unsafe { ... } - looks sound.
768unsafe fn - disappointing lack of debug_assert!.
777unsafe { ... } - looks sound.
781unsafe fn - disappointing lack of debug_assert!.
793unsafe fn - looks good.
800unsafe { ... } - looks sound.
804unsafe fn - disappointing lack of debug_assert!.
818unsafe fn - looks good.
ascii 0.9.2
negative
2019-07-29
none, high
issues:
high
Definite soundness issue
issues:
high
Probable soundness issue

UNSOUND: https://github.com/tomprogrammer/rust-ascii/issues/64 (I didn't catch this one)
unsound? https://github.com/tomprogrammer/rust-ascii/issues/65

Lots of repeated unsafe.
No debug_assert! s for uncheck codepaths.
Unsound test code assumes gen_range meets it's safe API contract.
Not fully reviewed.

Detail

FileRatingNotes
src/serialization/ascii_char.rs+1thoroughness: low, understanding: high throughout
src/serialization/ascii_str.rs+1
src/serialization/ascii_string.rs+1
src/serialization/mod.rs+1
src/ascii_char.rs0unsound test code?
src/ascii_str.rs-1UNSOUND - missing #[repr(transparent)]` !
src/ascii_string.rsN/AUnreviewed
src/free_functions.rsN/A
src/lib.rsN/A
.gitignoreN/A
.travis.ymlN/A
Cargo.toml+1
Cargo.toml.orig+1
LICENSE-APACHEN/A
LICENSE_MITN/A
README.mdN/A
RELEASES.mdN/A
tests.rsN/A
OtherRatingNotes
unsafe-1UNSOUND, disappointing lack of debug_assert!s.
fs+1?Not present?
io+1?Not present?
docs+1?
tests+1?

src/ascii_char.rs

LineNotes
22This must contain every value between 0..=127 for soundness guarantees bellow.
476unsafe { ... } - looks sound. case 1 handles 32..=126, case 2 handles 127, case 3 handles 0..=31. Not wild about this impl but looks valid. See https://en.wikipedia.org/wiki/Control_Pictures
498unsafe { ... } - looks sound. 'a' > 'A'
509unsafe { ... } - looks sound.
548unsafe { ... } - looks sound. Duplicate logic, annoyingly.
557unsafe { ... } - looks sound. Duplicate logic, annoyingly.
659unsafe fn - looks good.
670unsafe fn - disappointing lack of debug_assert!
678unsafe { ... } - looks sound.
686unsafe fn - disappointing lack of debug_assert!. transmute from u8 to #[repr(u8)] enum... I believe that's sound.
694unsafe { ... } - looks sound.
702unsafe fn - looks sound.
714UNSOUND TEST CODE? no guarantee generic Gen actually generates within range. Gated behind "quickcheck" feature.
735UNSOUND TEST CODE? no guarantee generic Gen actually generates within range. Gated behind "quickcheck" feature.

src/ascii_str.rs

LineNotes
116unsafe fn - looks good.
352UNSOUND unsafe { ... } - AsciiStr is not #[repr(transparent)] !
359UNSOUND unsafe { ... } - AsciiStr is not #[repr(transparent)] !
367UNSOUND unsafe { ... } - AsciiStr is not #[repr(transparent)] !
384scary transmuting impl_into! macro, audit all uses carefully
390UNSOUND unsafe { ... } - AsciiStr is not #[repr(transparent)] !
397UNSOUND unsafe { ... } - AsciiStr is not #[repr(transparent)] !
405UNSOUND unsafe { ... } - AsciiStr is not #[repr(transparent)] !
410I believed these invokes would be sound if AsciiStr was #[repr(transparent)], but https://github.com/tomprogrammer/rust-ascii/issues/64 proved me wrong.
668unsafe fn - looks good.
676unsafe fn - looks good.
689unsafe fn - looks good.
701unsafe fn - looks good.
713unsafe fn - looks good.
724unsafe fn - looks good.
734unsafe fn - looks good.
746unsafe fn - looks good.
756unsafe fn - looks good.
764unsafe { ... } - looks sound.
768unsafe fn - disappointing lack of debug_assert!.
777unsafe { ... } - looks sound.
781unsafe fn - disappointing lack of debug_assert!.
793unsafe fn - looks good.
800unsafe { ... } - looks sound.
804unsafe fn - disappointing lack of debug_assert!.
818unsafe fn - looks good.

© bestia.dev 2023, MIT License, Version: 2023.608.1636

Open source repository for this web app: https://github.com/bestia-dev/cargo_crev_web/