Is it 64-bit only? Which hardware are you using for this test?
EDIT:
I cannot reproduce on iPhone 5 which is NOT running any 64-bit kernel.
I only tested it on 64-bit systems, where it triggers the kernel panic from both 32- and 64-bit processes (i386, x86_64, arm, and arm64). Hardware-wise it crashes every single device I've tried (MacBook Pro, iMac, iPhone 6, etc.), so this is not tied to any specific hardware.
Aha, interesting. Does the program crash or exit gracefully?
Debugging with lldb: no crash;
Running from springboard: EXC_BAD_ACCESS (SIGKILL - CODESIGNING)
Just heard from Tyilo, in #frida on irc.freenode.net, that replacing mach_vm_* with vm_* makes the test-case work on 32-bit devices, where apparently mach_vm_* are missing.