mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 11:37:35 +00:00
f7ff77d865
- Invent iso8601us() for faster timestamps - Improve --strace descriptions of sigset_t - Rebuild the Landlock Make bootstrap binary - Introduce MODE=sysv for non-Windows builds - Permit OFD fcntl() locks under pledge(flock) - redbean can now protect your kernel from ddos - Have vfork() fallback to sys_fork() not fork() - Change kmalloc() to not die when out of memory - Improve documentation for some termios functions - Rewrite putenv() and friends to conform to POSIX - Fix linenoise + strace verbosity issue on Windows - Fix regressions in our ability to show backtraces - Change redbean SetHeader() to no-op if value is nil - Improve fcntl() so SQLite locks work in non-WAL mode - Remove some unnecessary work during fork() on Windows - Create redbean-based SSL reverse proxy for IPv4 TurfWar - Fix ape/apeinstall.sh warning when using non-bash shells - Add ProgramTrustedIp(), and IsTrustedIp() APIs to redbean - Support $PWD, $UID, $GID, and $EUID in command interpreter - Introduce experimental JTqFpD APE prefix for non-Windows builds - Invent blackhole daemon for firewalling IP addresses via UNIX named socket - Add ProgramTokenBucket(), AcquireToken(), and CountTokens() APIs to redbean
37 lines
1.4 KiB
C
37 lines
1.4 KiB
C
#if 0
|
|
/*─────────────────────────────────────────────────────────────────╗
|
|
│ To the extent possible under law, Justine Tunney has waived │
|
|
│ all copyright and related or neighboring rights to this file, │
|
|
│ as it is written in the following disclaimers: │
|
|
│ • http://unlicense.org/ │
|
|
│ • http://creativecommons.org/publicdomain/zero/1.0/ │
|
|
╚─────────────────────────────────────────────────────────────────*/
|
|
#endif
|
|
#include "libc/intrin/kprintf.h"
|
|
#include "libc/log/log.h"
|
|
#include "libc/runtime/symbols.internal.h"
|
|
|
|
/**
|
|
* @fileoverview How to print backtraces and cpu state on crash.
|
|
*
|
|
* make -j8 -O o//examples/crashreport.com
|
|
* o//examples/crashreport.com
|
|
*
|
|
* To prevent the GDB GUI from popping up:
|
|
*
|
|
* export GDB=
|
|
* make -j8 -O o//examples/crashreport.com
|
|
* o//examples/crashreport.com
|
|
*/
|
|
|
|
noubsan int main(int argc, char *argv[]) {
|
|
|
|
kprintf("----------------\n");
|
|
kprintf(" THIS IS A TEST \n");
|
|
kprintf("SIMULATING CRASH\n");
|
|
kprintf("----------------\n");
|
|
|
|
volatile int64_t x;
|
|
ShowCrashReports();
|
|
return 1 / (x = 0);
|
|
}
|