Review Request 128021: [libtaskmanager] Prevent from dereferencing dangling pointer
David Edmundson
david at davidedmundson.co.uk
Thu May 26 14:44:16 UTC 2016
> On May 26, 2016, 1:30 p.m., David Edmundson wrote:
> > Do you have a backtrace? Mostly so I can see if we can close any bug reports.
> >
> > A TaskManager.Backend objects is owned by the taskItem - so the lifespan of the TaskItem will *always* outlive the Backend - so we shouldn't need a smart pointer.
> > The ToolTip is more questionable, it has the same lifespan as the backend, so it's a bit confusing as to which order they get deleted - so there is scope for a problem.
> >
> > I'll wait for Eike, but +1 from me.
>
> Anthony Fieroni wrote:
> I don't have backtrace, cause gdb not produce it, i think stack is overheaded and it can't be reverted.
That comment doesn't match what your patch would be solving.
You're guarding a pointer to something in the heap, not on the stack; you're protecting a potential segmentation fault.
- David
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128021/#review95831
-----------------------------------------------------------
On May 26, 2016, 1:04 p.m., Anthony Fieroni wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128021/
> -----------------------------------------------------------
>
> (Updated May 26, 2016, 1:04 p.m.)
>
>
> Review request for Plasma and Eike Hein.
>
>
> Repository: plasma-desktop
>
>
> Description
> -------
>
> This pointers are *shared* between plasma-framework and libtaskamanger
>
>
> Diffs
> -----
>
> applets/taskmanager/plugin/backend.h 1d1a7a1
>
> Diff: https://git.reviewboard.kde.org/r/128021/diff/
>
>
> Testing
> -------
>
> I experience rare and strage crashes in plasmashell without backtrace when tooltip is dismissed in taskmanager. I guess stack is *smashed* cause dereferencing invalid pointer.
>
>
> Thanks,
>
> Anthony Fieroni
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160526/8932787e/attachment-0001.html>
More information about the Plasma-devel
mailing list