Closed korken89 closed 5 years ago
I can repro this on the stm32f103xx (blue-pill) using rustc 1.36.0-nightly (7c71bc320 2019-04-30)
. The problem goes away if I replace Box<DMAPool>
with struct NotBox;
so this may be related to destructors.
The problem also also goes away if I go from heapless' min-const-fn feature to const-fn. That change in features also changes the internal use of heapless::MaybeUninit
to core::mem::MaybeUninit
. So this could be UB caused by trying to implement core::mem::MaybeUninit
on stable, similar to #149.
@korken89 could you try PR #187 / #188? It fixes this issue for me; I tested on the blue-pill.
I will test it on the nRF52832
@japaric I have now tested, and the error still persists with heapless v0.4.4 on an nRF52832, if you need to borrow hardware I can fix that
I saw that the real MaybeUninit is on its way in, should we close this and await the beta and stable release?
At least to me it makes sense to close this awaiting permanent fix.
/Per
SGTM
We noticed at the Oxidize Workshop that there is a way to get the SPSC queue to fail to be made, see the example below. I checked the
heapless
implementation, and I was not able to get this to happen without RTFM, so maybe the issue is in here.Any ideas? @japaric @TeXitoi Original code: https://github.com/korken89/rtfm_workshop