Warning: Insufficiently meticulous use of ctypes can lead to serious, and often exploitable, errors. The use of bundled binary code, or access to system libraries, may allow for add-ons to perform unsafe operations. All ctypes use must be carefully reviewed by a qualified reviewer.
chrome/content/crashmeContent.js
Components.utils.import("resource://gre/modules/ctypes.jsm");
var zero = new ctypes.intptr_t(8);
var badptr = ctypes.cast(zero, ctypes.PointerType(ctypes.int32_t));
chrome/content/crashmeContent.js
var zero = new ctypes.intptr_t(8);
var badptr = ctypes.cast(zero, ctypes.PointerType(ctypes.int32_t));
var crash = badptr.contents;
From AMO when pushing the new release: