RIOT-OS / rust-riot-wrappers

The `riot-wrappers` crate, which enables high-level access to RIOT from the Rust programming language
13 stars 10 forks source link

vfs: Change dir API to place directory in a pin rather than returning it bv value #104

Closed chrysn closed 2 months ago

chrysn commented 2 months ago

This is a breaking change; applications that used the old API were prone to broken file system linked lists and thus UB with some file systems (whose data in the directory struct was not the moral equivalent of Unpin).

Closes: https://gitlab.com/etonomy/riot-wrappers/-/issues/8

Note that I don't manage to crash the system with the original issue's description any more -- most likely, Rust/LLVM nowadays does more optimizations that avoid moving things, and thus avoids the bug by happenstance.

chrysn commented 2 months ago

CI passes with the current faddcbf879524f232a96235ffd6df661e98a09ec version. Rolling back to not have the "DO NOT MERGE" in (CI will fail then) so that the PR will be recognized as merged when https://github.com/RIOT-OS/rust-riot-wrappers/pull/109 is merged.