-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Statically check parts of the RTS code with Frama-C #588
Conversation
and verify that all memory access is withing bounds. Also split rts.c into several files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A pro-forma LGTM
Thanks for the approval. I should at least add a section to the README explaining the setup and what is checked etc. |
Hmm, might not actually work for dynamic arrays the way I would want it to… (asked question at https://stackoverflow.com/q/57168439/946226). I should look into the other options too. |
unfortunately only by splitting the work for various fixed lenghts, as explained in https://stackoverflow.com/a/57178643/946226. Not sure how that scales. Add a missing check in the parser.
Can we use Rust for RTS code for IDL? Most of the memory issues will be gone with rust's type system. |
I tried that first, but the toolchain wasn’t up to creating dynamic Wasm modules yet. And I don’t think the memory issues will go away: We’d still be interfacing with the completely unsafe RTS parts written in WebAssembly directly, and thus can’t use the the Rust type checker for most stuff at the interface. That said, I would still prefer to be able to write this in Rust… Eventually, I guess. |
Probably not |
## Changelog for candid: Branch: master Commits: [dfinity/candid@c2419ac6...067025a8](dfinity/candid@c2419ac...067025a) * [`7758917b`](dfinity/candid@7758917) chore: elide needless lifetimes for rust 1.83.0 update to stable ([dfinity/candid#587](https://github.com/dfinity/candid/issues/587)) * [`5ee6538e`](dfinity/candid@5ee6538) feat: IDLBuilder.try_reserve_value_serializer_capacity ([dfinity/candid#586](https://github.com/dfinity/candid/issues/586)) * [`067025a8`](dfinity/candid@067025a) chore: release candid 0.10.11 ([dfinity/candid#588](https://github.com/dfinity/candid/issues/588))
## Changelog for candid: Branch: master Commits: [dfinity/candid@c2419ac6...067025a8](dfinity/candid@c2419ac...067025a) * [`7758917b`](dfinity/candid@7758917) chore: elide needless lifetimes for rust 1.83.0 update to stable ([dfinity/candid#587](https://github.com/dfinity/candid/issues/587)) * [`5ee6538e`](dfinity/candid@5ee6538) feat: IDLBuilder.try_reserve_value_serializer_capacity ([dfinity/candid#586](https://github.com/dfinity/candid/issues/586)) * [`067025a8`](dfinity/candid@067025a) chore: release candid 0.10.11 ([dfinity/candid#588](https://github.com/dfinity/candid/issues/588))
In particular, that all IDL memory access is within bounds.
Also splits rts.c into several files.