Comments (3)
A slightly easier approach could be to check whether generated rlib
file contains any strings with panic
. It will not catch any potential panics in uninlined functions from our dependencies (I think no-panic
is similar in this regard) and may break if in future we will add an item with "panic" in it (e.g. an error description), but it may be a bit friendlier to cross-compilation.
from getrandom.
A slightly easier approach could be to check whether generated
rlib
file contains any strings withpanic
.
One thing to look out for is that our current implementation will emit references to panic_in_cleanup
due to our use of DropGuard
. This is because the compiler can't statically determine that libc::close
and libc::pthread_mutex_unlock
will not panic. Replacing them with Rust stubs removes the panic_in_cleanup
references.
In general panic_in_cleanup
is fine, as it will never create a panic, it just aborts the process.
from getrandom.
Eventually it would be good to eliminate all uses of the panic infrastructure (and runtime library in general), but use_file and the fallback logic is the least urgent, IMO.
from getrandom.
Related Issues (20)
- Remove fallback logic for FreeBSD
- Investigate removing fallback logic for Solaris/Illumos HOT 1
- Windows: Switch to using ProcessPRNG by default. HOT 31
- `libc` `v0.2.154` yanked HOT 2
- Support `x86_64-unknown-linux-none` HOT 32
- Implementation of `dlsym`-based `Weak` is not sandbox-friendly HOT 6
- Use VM to run tests
- Release 0.3? HOT 8
- Feature handing changes HOT 2
- API Changes HOT 6
- Run `cargo clippy` in CI for all targets
- Potential improvements to use of `/dev/random` on Linux/Android HOT 5
- use_file: Just use `libstd` on targets that we know have libstd, instead of pthreads + libc. HOT 20
- Deprecate and remove `getrandom_uninit` HOT 7
- Deprecate and remove `impl From<NonZeroU32> for Error`. HOT 1
- Crate libc 0.2.154 is yanked HOT 6
- Force use of `rdrand` feature instead of `linux_android` implementation HOT 2
- Consider updating to `wasi v0.13.1+wasi-0.2.0`
- $20 in $SOL to whoever can help me solve this getrandom error when i run anchor build HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from getrandom.