Comments (3)
Edited my comment to say that this cannot be a use-after-free using only safe Rust. So it's not a vulnerability/UB.
from alsa-rs.
So I think you have a point, but as you say it's only meant to be used with unsafe code anyway. And no lifetime annotation means simpler code. So maybe it would be better to just write documentation about this. And btw - this is quite transient data anyhow, wait a second and all values will be obsolete so having a lifetime annotation might give the impression that the data would be valid as long as the mmapio is valid, which might be true from a Rust memory safety perspective but not a practical one...
from alsa-rs.
So I'm leaning towards keeping it as it is, but if you have a good use case for where this would be very helpful I'm open for such an argument :-)
from alsa-rs.
Related Issues (20)
- Would you consider implementing FromStr or serde for `Format` HOT 1
- supported snd_pcm_set_params API HOT 2
- Update to bitflags 2.0 HOT 2
- How to use SelemId::new? HOT 3
- Tag off a release? HOT 1
- Support Creating an Hctl from a Ctl via snd_hctl_open_ctl HOT 3
- Contributing HOT 2
- `nix` dependency is out of date
- Can pcm::IO<S> be Send? HOT 3
- include license in crate source HOT 3
- test failed in fedora copr HOT 4
- Avoid panic if card gives bad state HOT 12
- Release new version HOT 5
- Please yank 0.5.1 and release as 0.6.0 HOT 5
- Microphone recording example? HOT 4
- missing snd_ctl_elem_read, snd_ctl_elem_write HOT 2
- Alsa 0.6.1 release is not semver compliant HOT 22
- PCM capture to playback and dropouts HOT 2
- `alsa::seq::EventData::get_data` feels unsafe HOT 4
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 alsa-rs.