[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Is deallocating MACH_PORT_NULL an error ?
From: |
Justus Winter |
Subject: |
Is deallocating MACH_PORT_NULL an error ? |
Date: |
Thu, 22 Jan 2015 22:22:04 +0100 |
Hello :)
I've been hunting port handling bugs, and came up with the patch that
will follow this mail. You will note that we do not print warnings if
MACH_PORT_NULL or MACH_PORT_DEAD is supplied:
runsystem@nonmonolithic / > (mach-port-deallocate mach-task-self MACH_PORT_NULL)
Error: (mach-port-deallocate: (os/kern) invalid name)
runsystem@nonmonolithic / > (mach-port-deallocate mach-task-self MACH_PORT_DEAD)
Error: (mach-port-deallocate: (os/kern) invalid name)
runsystem@nonmonolithic / > (mach-port-deallocate mach-task-self 1337)
task bootshell deallocating an invalid port 1337, most probably a bug.
Error: (mach-port-deallocate: (os/kern) invalid name)
When I tried to also print warnings in these cases, I was overwhelmed
by them. On the other hand I know that these are likely in the libc
(b/c of the process names I saw, and I have a coccinelle patch that
adds error handling to most of these calls in the Hurd sources [the
patch is too noisy to commit though]).
So do we consider {deallocating,destroying,mod_refing} MACH_PORT_NULL
or MACH_PORT_DEAD an error, or an expensive nop ?
Justus
- Is deallocating MACH_PORT_NULL an error ?,
Justus Winter <=