logo

Rust crates reviews

Cryptographically verifiable, distributed dependency reviews

crate: lazy_static

https://lib.rs/crates/lazy_static/

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

lazy_static = "1.4.0"

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
8
13
4
6
2
5
1
1
1
1
crate version
rating
date
reviewer
thoroughness, understanding
lazy_static 1.4.0
positive
2019-09-03
high, high

1.4.0: Read diff, looks fine.
1.3.0: Read all of src, skimmed all of tests. core_lazy.rs looks a little odd, but is 100% safe code - any issues would be in it's core dependency, spin. inline_lazy.rs contains unsafe blocks... look safe, but downgrades rating to merely positive. lib.rs is just safe macros. Tests all pass.

lazy_static 1.4.0
positive
2019-08-30
medium, high

A bit puzzling that the inline implementation does not use UnsafeCell
directly but only through Cell. This adds a Sync impl which explicitely can
not exist for Cell itself. But the Once is enough to protect against races
even though there is no real benefit from using Cell over UnsafeCell.

lazy_static 1.4.0
strong
2019-08-28
medium, high

The 1.4.0 release removes the hand-rolled unreachable hint in favor of
unreachable_unchecked, which was a new API introduced in Rust 1.27.
Otherwise, nothing substantial was changed, other than allowing some
deprecated APIs to support older versions of Rust.

lazy_static 1.3.0
positive
2019-08-20
low, medium
lazy_static 1.3.0
positive
2019-07-23
high, high

Read all of src, skimmed all of tests. core_lazy.rs looks a little odd, but is 100% safe code - any issues would be in it's core dependency, spin. inline_lazy.rs contains unsafe blocks... look safe, but downgrades rating to merely positive. lib.rs is just safe macros. Tests all pass.

lazy_static 1.3.0
positive
2019-06-21
low, medium
lazy_static 1.3.0
positive
2019-06-21
low, medium

It looks OK... it's a little hard to check all the possible ways such a code could be flawed, though.

lazy_static 1.2.0
strong
2018-12-20
medium, medium
lazy_static 0.2.11
negative
2019-07-24
medium, medium

lazy_static 0.2.11 relied on unsafe muts which would have race conditions during initialization.
I recommend upgrading to a modern lazy_static 1.3.0+!

src\core_lazy.rs: +1
src\lazy.rs: -1 UNSOUND (race conditions in multithreaded init due to static mut / mut refs taken outside of call_once)
src\lib.rs: -1 UNSOUND (uses the static muts without syncronization)
src\nightly_lazy.rs: -1 UNSOUND (race conditions in multithreaded init due to static mut / mut refs taken outside of call_once)

tests*: +1 (skimmed, seem fine)

.travis.yml: +1
.appveyor.yml: +1
Cargo.toml: +1
Cargo.toml.orig: +1
README.md: +1

© bestia.dev 2021, MIT Licence, Version: 2021.1208.1729

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