theCore icon indicating copy to clipboard operation
theCore copied to clipboard

The Bus: set_buffers() hit assert during async xfer handling afer unlock()

Open forGGe opened this issue 9 years ago • 1 comments

Following call order leads to assertion hit:

  • lock() - bus is locked
  • xfer(callback) - async xfer scheduled
  • unlock() - schedule unlocking
  • Interrupt occur, callback is called
  • New buffers tried to be set with set_buffers() call
  • assert hits in ecl_assert(m_state & bus_locked);

See: https://github.com/forGGe/theCore/blob/master/dev/bus/export/dev/bus.hpp#L321

One of possible solution is to reject is as expected, since unlocked bus must support very limited functionality, e.g. setting buffers shouldn't be allowed outsize of interrupt.

forGGe avatar Jun 21 '16 20:06 forGGe

Not enough cases to analyze. Postponed.

forGGe avatar Nov 23 '16 23:11 forGGe