- Press F12 (in a tab!)
- Click on the tree dots in the upper right corner
- Click on “Settings”
- Click “Enable browser chrome and add-on debugging toolboxes”
- Click “Enable remote debugging”
- Press Ctrl + Alt + Shift + I
- A popup called “Incoming Connection” should open If “Client Endpoint” or “Server Endpoint” isn’t
something with 127.0.0.1 click “Disable” – You can’t continue – If it is something with 127.0.0.1 click “OK” - You can choose “Parent process only (Fast)” or “Multiprocess (Slower”
- Go to the “Console” tab
- Type
Cu.import("resource://gre/modules/ctypes.jsm"); let zero = new ctypes.intptr_t(8); let badptr = ctypes.cast(zero, ctypes.PointerType(ctypes.int32_t)); badptr.contents;
10.1 If you need an two liner, here is it: Cu.import("resource://gre/modules/ctypes.jsm"); ctypes.cast(new ctypes.intptr_t(8), ctypes.PointerType(ctypes.int32_t));
10.2 And as one liner: Cu.import("resource://gre/modules/ctypes.jsm").ctypes.cast(new Cu.import("resource://gre/modules/ctypes.jsm").ctypes.intptr_t(8), Cu.import("resource://gre/modules/ctypes.jsm").ctypes.PointerType(Cu.import("resource://gre/modules/ctypes.jsm").ctypes.int32_t)).contents
- Crash!
Credits: https://superuser.com/a/678426