[Webkit-unassigned] [Bug 238493] IPC::Connection::UniqueID is not possible to use in thread safe manner

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 4 05:52:04 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=238493

--- Comment #6 from Kimmo Kinnunen <kkinnunen at apple.com> ---
For the lifetime,
https://en.cppreference.com/w/cpp/language/lifetime

  The lifetime of an object ends when:
   ...
    if it is of a class type, the destructor call starts, or
   ...

I discussed this in cpp channel in our slack year ago, and I think the conclusion was this.

I also tried to get somebody explicitly define where it says
 * threads externally cannot call the members
 * the destructor can call member functions normally and they can call other functions  normally.

The latter part devolved a bit.

Anyway, the point being, based on my understanding on the above link presented as the justification: From C++ perspective it is undefined behavior to have one thread in destructor and one accessing a member function or variable. It might work or might not, but it is a use-after-free bug.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220404/8a36f94a/attachment-0001.htm>


More information about the webkit-unassigned mailing list