mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
Base: Update crash(1) man page
Update the outdated list of options, mention UserspaceEmulator, update example shell output.
This commit is contained in:
parent
f3f2d77624
commit
22df4727b1
1 changed files with 10 additions and 10 deletions
|
@ -10,36 +10,36 @@ $ crash [options]
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
This program is used to test how the Serenity kernel handles
|
This program is used to test how the Serenity kernel or UserspaceEmulator
|
||||||
userspace crashes, and can be used to simulate many different
|
handle userspace crashes, and can be used to simulate many different kinds
|
||||||
kinds of crashes.
|
of crashes.
|
||||||
|
|
||||||
## Options
|
## Options
|
||||||
|
|
||||||
* `-A`: Test that all of the following crashes crash as intended.
|
* `-A`: Test that all of the following crash types crash as expected.
|
||||||
* `-s`: Perform a segmentation violation by dereferencing an invalid pointer.
|
* `-s`: Perform a segmentation violation by dereferencing an invalid pointer.
|
||||||
* `-d`: Perform a division by zero.
|
* `-d`: Perform a division by zero.
|
||||||
* `-i`: Execute an illegal CPU instruction.
|
* `-i`: Execute an illegal CPU instruction.
|
||||||
* `-a`: Call `abort()`.
|
* `-a`: Call `abort()`.
|
||||||
* `-m`: Read a pointer from uninitialized memory, then read from it.
|
* `-m`: Read a pointer from uninitialized malloc memory, then read from it.
|
||||||
* `-f`: Read a pointer from memory freed using `free()`, then read from it.
|
* `-f`: Read a pointer from memory freed using `free()`, then read from it.
|
||||||
* `-M`: Read a pointer from uninitialized memory, then write to it.
|
* `-M`: Read a pointer from uninitialized malloc memory, then write to it.
|
||||||
* `-F`: Read a pointer from memory freed using `free()`, then write to it.
|
* `-F`: Read a pointer from memory freed using `free()`, then write to it.
|
||||||
* `-r`: Write to read-only memory.
|
* `-r`: Write to read-only memory.
|
||||||
* `-T`: Make a syscall while using an invalid stack pointer.
|
* `-T`: Make a syscall while using an invalid stack pointer.
|
||||||
* `-t`: Trigger a page fault while using an invalid stack pointer.
|
* `-t`: Trigger a page fault while using an invalid stack pointer.
|
||||||
* `-S`: Make a syscall from writeable memory.
|
* `-S`: Make a syscall from writeable memory.
|
||||||
* `-x`: Read from recently freed memory. (Tests an opportunistic malloc guard.)
|
* `-X`: Attempt to execute non-executable memory (Not mapped with PROT\_EXEC).
|
||||||
* `-y`: Write to recently freed memory. (Tests an opportunistic malloc guard.)
|
|
||||||
* `-X`: Attempt to execute non-executable memory. (Not mapped with PROT\_EXEC.)
|
|
||||||
* `-U`: Attempt to trigger an x86 User Mode Instruction Prevention fault.
|
* `-U`: Attempt to trigger an x86 User Mode Instruction Prevention fault.
|
||||||
* `-I`: Use an x86 I/O instruction in userspace.
|
* `-I`: Use an x86 I/O instruction in userspace.
|
||||||
* `-c`: Read the x86 TSC (Time Stamp Counter) directly.
|
* `-c`: Read the x86 TSC (Time Stamp Counter) directly.
|
||||||
|
* `-p`: Violate `pledge()`'d promises.
|
||||||
|
* `-n`: Perform a failing assertion.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ crash -F
|
$ crash -F
|
||||||
Testing: "Write to freed memory"
|
Testing: "Write to freed memory"
|
||||||
Shell: crash(33) exitied due to signal "Segmentation violation"
|
Shell: Job 1 (crash -F) Segmentation violation
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue