mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-03 01:38:30 +00:00
Make improvements
- Make rand64() thread safe - Introduce lemur64 lcg prng - Improve strace on New Technology - Improve msync() on New Technology
This commit is contained in:
parent
43ba3009b2
commit
29bf8b1a30
73 changed files with 888 additions and 269 deletions
|
@ -171,27 +171,14 @@ void ShowBacktrace(int fd, const struct StackFrame *bp) {
|
|||
#ifdef __FNO_OMIT_FRAME_POINTER__
|
||||
/* asan runtime depends on this function */
|
||||
int st, ft;
|
||||
static bool noreentry;
|
||||
if (!noreentry) {
|
||||
noreentry = true;
|
||||
st = __strace, __strace = 0;
|
||||
ft = g_ftrace, g_ftrace = 0;
|
||||
if (!bp) bp = __builtin_frame_address(0);
|
||||
|
||||
st = __strace;
|
||||
__strace = 0;
|
||||
PrintBacktrace(fd, bp);
|
||||
|
||||
ft = g_ftrace;
|
||||
g_ftrace = 0;
|
||||
|
||||
if (!bp) {
|
||||
bp = __builtin_frame_address(0);
|
||||
}
|
||||
|
||||
PrintBacktrace(fd, bp);
|
||||
|
||||
__strace = st;
|
||||
g_ftrace = ft;
|
||||
|
||||
noreentry = false;
|
||||
}
|
||||
__strace = st;
|
||||
g_ftrace = ft;
|
||||
#else
|
||||
kprintf("ShowBacktrace() needs these flags to show C backtrace:%n"
|
||||
"\t-D__FNO_OMIT_FRAME_POINTER__%n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue