[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mach_task_self, mach_thread_self, mach_host_self

From: Justus Winter
Subject: Re: mach_task_self, mach_thread_self, mach_host_self
Date: Wed, 03 Jun 2015 15:18:28 +0200
User-agent: alot/0.3.5

Quoting Richard Braun (2015-06-03 14:10:16)
> On Wed, Jun 03, 2015 at 01:54:40PM +0200, Justus Winter wrote:
> > I independently rediscovered that host port leak.  I see two options
> > how to proceed:
> The host and task ports actually don't leak, because they're unique to
> a task, and Mach treats them as exceptions by never overruning the user
> space ref count. This means that calling mach_host_self() a lot of times
> results in a single name with a very high ref count, and nothing else.

Clamping user references like that is clearly a bad hack covering up
sloppy programming.

> This is the expected behaviour.

Expected of what?  The Mach messaging semantics?  The behaviour is
stupid.  We should fix it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]