Comments (2)
Thanks for the feedback,
This is true than unsafe_load can lead to un-protected memory but AFAIK it is prevented by the use of the Ref{}
in the structure as it stores the result of the unsafe_load
. So It should not lead to seg fault that way (even the approach here is unsafe :)).
Did you encounter any problem of GC-ed variables with UHDBindings ?
from uhdbindings.jl.
I have not experienced any actual issues.
However, the nature of memory safety issues is that they often only manifest themselves in rare circumstances.
Most of the time (or possibly always until someone changes the implementation) the garbage collector does not get in the way.
But unless it’s guaranteed that it won’t happen, it’s still an issue.
I’m still new to Julia and may therefore be misunderstanding the guarantees that are provided by the language,
but the way I see it, if the garbage collector was triggered on line 126 of Rx.jl, it would be allowed to collect cpu_format, otw_format, args, and channels, all of which need to still be alive for the call to uhd_usrp_get_rx_stream on line 130.
The fact that the variables are still in scope does not help, as the compiler can determine that they are not used (directly) anymore.
from uhdbindings.jl.
Related Issues (6)
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 uhdbindings.jl.