]>
git.saurik.com Git - apple/xnu.git/blob - tests/regression_17272465.c
1 #include <darwintest.h>
4 #include <mach/host_priv.h>
7 T_DECL(regression_17272465
,
8 "Test for host_set_special_port Mach port over-release, rdr: 17272465", T_META_CHECK_LEAKS(false))
11 mach_port_t port
= MACH_PORT_NULL
;
15 T_ASSERT_MACH_SUCCESS(mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE
, &port
), NULL
);
17 T_ASSERT_MACH_SUCCESS(mach_port_insert_right(mach_task_self(), port
, port
, MACH_MSG_TYPE_MAKE_SEND
), NULL
);
20 (void)host_set_special_port(mach_host_self(), 30, port
);
21 (void)host_set_special_port(mach_host_self(), 30, port
);
22 (void)host_set_special_port(mach_host_self(), 30, port
);
24 T_PASS("No panic occurred");