summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-01-22 19:59:22 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-01-22 19:59:22 +0100
commit0552edc695a235dba2dea3ba6962af29e17f36a7 (patch)
tree38a65daaa8de80228938d33132b7856f857a9080 /debian/patches
parent73d29af047847cec430436d20dc88054c6b34521 (diff)
update patch
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/pedantic-port-management.patch18
1 files changed, 13 insertions, 5 deletions
diff --git a/debian/patches/pedantic-port-management.patch b/debian/patches/pedantic-port-management.patch
index 28a5a69..3f1aa97 100644
--- a/debian/patches/pedantic-port-management.patch
+++ b/debian/patches/pedantic-port-management.patch
@@ -1,11 +1,15 @@
-commit b8a37a969944e48d3a1c8ed36c72c51c6f9f7f0f
+commit b700e68a2c42a94bdbcac9e3ece8d951fade3258
Author: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Wed Jan 21 00:09:10 2015 +0100
- ipc: be more pedantic XXX
+ ipc: warn about more port management bugs
+
+ * ipc/mach_port.c (mach_port_destroy): Simplify expression.
+ (mach_port_deallocate): Likewise.
+ (mach_port_mod_refs): Also warn about errors when using this function.
diff --git a/ipc/mach_port.c b/ipc/mach_port.c
-index c7d9b81..24db40e 100644
+index c7d9b81..e0ba4fe 100644
--- a/ipc/mach_port.c
+++ b/ipc/mach_port.c
@@ -570,7 +570,7 @@ mach_port_destroy(
@@ -26,14 +30,18 @@ index c7d9b81..24db40e 100644
printf("task %.*s deallocating an invalid port %lu, most probably a bug.\n", sizeof current_task()->name, current_task()->name, name);
if (mach_port_deallocate_debug)
SoftDebugger("mach_port_deallocate");
-@@ -735,8 +735,14 @@ mach_port_mod_refs(
+@@ -735,8 +735,18 @@ mach_port_mod_refs(
return KERN_INVALID_VALUE;
kr = ipc_right_lookup_write(space, name, &entry);
- if (kr != KERN_SUCCESS)
+ if (kr != KERN_SUCCESS) {
+ if (MACH_PORT_VALID (name) && space == current_space()) {
-+ printf("task %.*s frobnicating an invalid port %lu, most probably a bug.\n", sizeof current_task()->name, current_task()->name, name);
++ printf("task %.*s %screasing an invalid port "
++ "%lu by %d, most probably a bug.\n",
++ sizeof current_task()->name,
++ current_task()->name,
++ delta < 0 ? "de" : "in", name, delta);
+ if (mach_port_deallocate_debug)
+ SoftDebugger("mach_port_mod_refs");
+ }