Closed asfishman closed 4 years ago
This is most likely a heap corruption.
o1heap is being used inside an interrupt in my application as I use libcanard.
How do you synchronize the access? Do you invoke the invariant check function at runtime?
I do not do any synchronization, could you point me towards some examples on how to handle access from inside an interrupt? Currently, my critical section enter and leaves are NULL.
https://stackoverflow.com/questions/40019929/temporarily-disable-interrupts-on-arm
I am not using the invariant check either. What should I do if the invariant checker is false? How do I recover from that?
Crash the program with an error. This is an unrecoverable condition.
Could this be caused by GDB? I am now running a release build of my code with no GDB, and I have not seen any issues.
You just run out of luck.
Yup...Figuered out what I was doing wrong
I am on an STM32G474.
This assert is failing?
https://github.com/pavel-kirienko/o1heap/blob/master/o1heap/o1heap.c#L328
Here are the diagnostics at the time of the error.
How can I fix this? It crashes the program which is not good for something intended to be flying :(
Should the
o1heap
opaque pointer be declaredvolatile
? How about the memory arena? Should it also be volatile?o1heap is being used inside an interrupt in my application as I use libcanard.