mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-27 15:52:28 +00:00
Make exciting improvements
- Add Lua backtraces to redbean! - Wipe serving keys after redbean forks - Audit redbean to remove free via exit - Log SSL client ciphersuite preferences - Increase ASAN malloc() backtrace depth - Make GetSslRoots() behave as a singleton - Move leaks.c from LIBC_TESTLIB to LIBC_LOG - Add undocumented %n to printf() for newlines - Fix redbean memory leak reindexing inode change - Fix redbean memory leak with Fetch() DNS object - Restore original environ after __cxa_finalize() - Make backtrace always work after __cxa_finalize() - Introduce COUNTEXPR() diagnostic / benchmark tool - Fix a few more instances of errno being clobbered - Consolidate the ANSI color disabling internal APIs
This commit is contained in:
parent
f5831a62fa
commit
af645fcbec
61 changed files with 1354 additions and 814 deletions
|
@ -8,7 +8,10 @@
|
|||
╚─────────────────────────────────────────────────────────────────*/
|
||||
#endif
|
||||
#include "libc/bits/bits.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
|
||||
/**
|
||||
* ASAN static memory safety crash example.
|
||||
|
@ -40,11 +43,17 @@
|
|||
* 0x000000000040268d: cosmo at libc/runtime/cosmo.S:64
|
||||
* 0x00000000004021ae: _start at libc/crt/crt.S:77
|
||||
*
|
||||
* @see libc/intrin/asancodes.h for meaning of G, etc. and negative numbers
|
||||
* @see libc/nexgen32e/kcp437.S for meaning of symbols
|
||||
*/
|
||||
|
||||
char buffer[13] = "hello";
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
if (!IsAsan()) {
|
||||
printf("this example is intended for MODE=asan or MODE=dbg\n");
|
||||
exit(1);
|
||||
}
|
||||
ShowCrashReports(); /* not needed but yoinks appropriate symbols */
|
||||
int i = 13;
|
||||
asm("" : "+r"(i)); /* prevent compiler being smart */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue