[libcamera-devel] [PATCH] lc-compliance: Fix segfault on request destruction
Nícolas F. R. A. Prado
nfraprado at collabora.com
Wed Nov 30 18:18:40 CET 2022
On Wed, Nov 30, 2022 at 10:55:50AM +0000, Kieran Bingham wrote:
> Hi Nícolas,
>
> Thanks for looking at this issue.
>
> Quoting Nícolas F. R. A. Prado via libcamera-devel (2022-11-30 00:10:44)
> > The Request destructor cancels all associated framebuffers, and
> > therefore assumes they are all still valid. The SimpleCaptureBalanced
> > and SimpleCaptureUnbalanced classes that run the capture sessions on
> > lc-compliance however were freeing the framebuffers before the requests,
> > stored in an automatic variable, were destroyed. This resulted in a
> > segfault when running lc-compliance.
> >
> > Solve the issue by moving the requests vector to the SimpleCapture class
> > and making sure we clear it on stop() before freeing the framebuffers.
>
> I'm afraid Paul has 'just' beaten you to it with a patch posted
> yesterday:
>
> - https://patchwork.libcamera.org/patch/17906/
>
>
> Could you review and test his patch please?
Ah indeed, I missed that. Well, it's almost exactly the same patch, so that's
reassuring :). I'll reply there, thanks.
Nícolas
More information about the libcamera-devel
mailing list