Files
prplMesh/framework/common
Lu Dai e3e4ee0fa0 ambiorix: amxp_signal_read race condition
AmbiorixConnection::read_signal and the lambda in AmbiorixImpl::init_signal_loop may race when
multiple signals with the same path arrive at the same time, because the underlying amxp_signal_read
does not treat the expression evaluation procedure as a critical area, which free/alloc memory
to the expression binary tree when evaluate fields.

this fix adds a mutex to avoid amxp_signal_read race condition, the cost is performance. before
this commit, most signals which have different paths can race without any consequence, only those
have the same path possiblly trigger SIGSEGV. after this commit, all signals handling have to be
synchronized, even if they do not share the same path.

Signed-off-by: Lu Dai <lu.dai@mind.be>
2025-02-21 14:36:56 +01:00
..