[all-commits] [llvm/llvm-project] bcc202: [libc] Prevent changing ownership of the port once...

Joseph Huber via All-commits all-commits at lists.llvm.org
Wed May 10 16:34:46 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bcc2021efdab6148fed03899648731e1cda8cfa8
      https://github.com/llvm/llvm-project/commit/bcc2021efdab6148fed03899648731e1cda8cfa8
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M libc/src/__support/RPC/rpc.h

  Log Message:
  -----------
  [libc] Prevent changing ownership of the port once opened

The Port type has stipuations that the same exact mask used to open it
needs to close it. This can currently be violated by calling its move
constructor to put it somewhere else. We still need the move constructor
to handle the open and closing functions. So, we simply make these
constructors private and only allow a few classes to have move
priviledges on it.

Reviewed By: JonChesterfield, lntue

Differential Revision: https://reviews.llvm.org/D150118




More information about the All-commits mailing list