[libcamera-devel] [PATCH 0/3] base: Fix crash with recursive messages dispatch

Laurent Pinchart laurent.pinchart at ideasonboard.com
Fri Jul 2 01:07:38 CEST 2021


Hello,

This patch series fixes a crash related to recursive dispatch of
messages, as reported in https://bugs.libcamera.org/show_bug.cgi?id=26.

Patch 1/3 is a small drive-by documentation fix. Patch 2/3 adds a test
case to trigger the issue, and patch 3/3 fixes it. Please see patch 3/3
for a detailed explanation of the problem and the fix.

David, would you be able to check if this fixes the issue you've
reported ?

Laurent Pinchart (3):
  base: thread: Document the postMessage() function as thread-safe
  test: message: Test recursive Thread::dispatchMessages() calls
  base: thread: Fix recursive calls to dispatchMessages()

 src/libcamera/base/thread.cpp | 45 ++++++++++++++++++------
 test/message.cpp              | 66 +++++++++++++++++++++++++++++++++--
 2 files changed, 99 insertions(+), 12 deletions(-)

-- 
Regards,

Laurent Pinchart



More information about the libcamera-devel mailing list