From dc4ad691d58fa720e3a65ba04b478c1a6447cad3 Mon Sep 17 00:00:00 2001 From: therzok Date: Wed, 23 Oct 2019 00:24:07 +0300 Subject: Add example of how to crash from a pinvoke --- main/build/MacOSX/monostub.mm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'main/build') diff --git a/main/build/MacOSX/monostub.mm b/main/build/MacOSX/monostub.mm index f42dd641aa..c99e2cbb8c 100644 --- a/main/build/MacOSX/monostub.mm +++ b/main/build/MacOSX/monostub.mm @@ -227,6 +227,12 @@ load_xammac() } } +extern "C" void crash_me() +{ + void *p = (void*)0x12345; + *(int *)p = 0; +} + int main (int argc, char **argv) { -- cgit v1.2.3