threadx icon indicating copy to clipboard operation
threadx copied to clipboard

Fix the issue of byte pool alloc fail when compile with -O3 optimization

Open yuhiping opened this issue 1 year ago • 1 comments

https://github.com/eclipse-threadx/threadx/issues/334

PR checklist

  • [x] Updated function header with a short description and version number
  • [x] Added test case for bug fix or new feature
  • [x] Validated on real hardware

yuhiping avatar Feb 28 '24 11:02 yuhiping

It seems that the root-cause for this issue is a missing memory-clobber/compiler-barrier in the TX_DISABLE and TX_RESTORE macros (https://github.com/eclipse-threadx/threadx/issues/334#issuecomment-2068839866). I would suggest fixing this issue in the cpu-specific ports instead. There might be other places in the code with possible issues because of this.

freyc avatar Apr 30 '24 09:04 freyc