Fix OS X host_create_mach_voucher: UNKNOWN host message [id 222, to mach_host_self(), reply 0x........]

bz#343649

Before:

== 591 tests, 220 stderr failures, 14 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 591 tests, 220 stderr failures, 14 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15299
This commit is contained in:
Rhys Kidd 2015-05-31 03:17:53 +00:00
parent c8440021c5
commit d289179fd2
3 changed files with 45 additions and 0 deletions

2
NEWS
View File

@ -168,6 +168,8 @@ where XXXXXX is the bug number as listed below.
343525 OS X host_get_special_port: UNKNOWN host message [id 412, to
mach_host_self(), reply 0x........]
343597 ppc64le: incorrect use of offseof macro
343649 OS X host_create_mach_voucher: UNKNOWN host message [id 222, to
mach_host_self(), reply 0x........]
343732 Unhandled syscall 144 (setgid) on aarch64
343733 Unhandled syscall 187 (msgctl and related) on aarch64
343802 s390x: Fix false positives "conditional jump or move depends on

View File

@ -573,6 +573,7 @@ DECL_TEMPLATE(darwin, host_page_size);
DECL_TEMPLATE(darwin, host_get_io_master);
DECL_TEMPLATE(darwin, host_get_clock_service);
DECL_TEMPLATE(darwin, host_request_notification);
DECL_TEMPLATE(darwin, host_create_mach_voucher);
DECL_TEMPLATE(darwin, host_get_special_port);
DECL_TEMPLATE(darwin, mach_port_type);
DECL_TEMPLATE(darwin, mach_port_extract_member);

View File

@ -4963,6 +4963,45 @@ PRE(host_request_notification)
}
PRE(host_create_mach_voucher)
{
#pragma pack(4)
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_msg_type_number_t recipesCnt;
uint8_t recipes[5120];
} Request;
#pragma pack()
Request *req = (Request *)ARG1;
PRINT("host_create_mach_voucher(count %u)",
req->recipesCnt);
AFTER = POST_FN(host_create_mach_voucher);
}
POST(host_create_mach_voucher)
{
#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 voucher;
/* end of the kernel processed data */
} Reply;
#pragma pack()
Reply *reply = (Reply *)ARG1;
// RK fixme properly parse this return type
PRINT("got voucher %#x ", reply->voucher.name);
}
PRE(host_get_special_port)
{
#pragma pack(4)
@ -7848,6 +7887,9 @@ PRE(mach_msg_host)
case 217:
CALL_PRE(host_request_notification);
return;
case 222:
CALL_PRE(host_create_mach_voucher);
return;
case 412:
CALL_PRE(host_get_special_port);