|
From: <sv...@va...> - 2015-06-13 22:59:55
|
Author: rhyskidd
Date: Sat Jun 13 23:59:47 2015
New Revision: 15339
Log:
Fix UNKNOWN task message [id 3410, to mach_task_self(), reply 0x........] (task_set_special_port)
bz#349087
On OS X 10.10
Before:
== 592 tests, 222 stderr failures, 14 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==
After:
== 592 tests, 222 stderr failures, 14 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==
Modified:
trunk/NEWS
trunk/coregrind/m_syswrap/priv_syswrap-darwin.h
trunk/coregrind/m_syswrap/syswrap-darwin.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Sat Jun 13 23:59:47 2015
@@ -239,6 +239,8 @@
348949 Bogus "ERROR: --ignore-ranges: suspiciously large range"
349086 Fix UNKNOWN task message [id 3406, to mach_task_self(),
reply 0x........] (task_set_info)
+349087 Fix UNKNOWN task message [id 3410, to mach_task_self(),
+ reply 0x........] (task_set_special_port)
n-i-bz Provide implementations of certain compiler builtins to support
compilers who may not provide those
n-i-bz Old STABS code is still being compiled, but never used. Remove it.
Modified: trunk/coregrind/m_syswrap/priv_syswrap-darwin.h
==============================================================================
--- trunk/coregrind/m_syswrap/priv_syswrap-darwin.h (original)
+++ trunk/coregrind/m_syswrap/priv_syswrap-darwin.h Sat Jun 13 23:59:47 2015
@@ -591,6 +591,7 @@
DECL_TEMPLATE(darwin, mach_port_set_attributes);
DECL_TEMPLATE(darwin, mach_port_insert_member);
DECL_TEMPLATE(darwin, task_get_special_port);
+DECL_TEMPLATE(darwin, task_set_special_port);
DECL_TEMPLATE(darwin, task_get_exception_ports);
DECL_TEMPLATE(darwin, semaphore_create);
DECL_TEMPLATE(darwin, semaphore_destroy);
Modified: trunk/coregrind/m_syswrap/syswrap-darwin.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-darwin.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-darwin.c Sat Jun 13 23:59:47 2015
@@ -5851,6 +5851,48 @@
}
+PRE(task_set_special_port)
+{
+#pragma pack(4)
+ typedef struct {
+ mach_msg_header_t Head;
+ /* start of the kernel processed data */
+ mach_msg_body_t msgh_body;
+ mach_msg_port_descriptor_t special_port;
+ /* end of the kernel processed data */
+ NDR_record_t NDR;
+ int which_port;
+ } Request;
+#pragma pack()
+
+ Request *req = (Request *)ARG1;
+
+ PRINT("got port %#x ", req->special_port.name);
+
+ // MACH_ARG(task_set_special_port.which_port) = req->which_port;
+ PRINT("%s", name_for_port(req->special_port.name));
+
+ AFTER = POST_FN(task_set_special_port);
+}
+
+POST(task_set_special_port)
+{
+#pragma pack(4)
+ typedef struct {
+ mach_msg_header_t Head;
+ NDR_record_t NDR;
+ kern_return_t RetCode;
+ } Reply;
+#pragma pack()
+
+ Reply *reply = (Reply *)ARG1;
+ if (!reply->RetCode) {
+ } else {
+ PRINT("mig return %d", reply->RetCode);
+ }
+}
+
+
PRE(semaphore_create)
{
#pragma pack(4)
@@ -8032,10 +8074,12 @@
case 3408:
CALL_PRE(task_resume);
return;
-
case 3409:
CALL_PRE(task_get_special_port);
return;
+ case 3410:
+ CALL_PRE(task_set_special_port);
+ return;
case 3411:
CALL_PRE(thread_create);
return;
|