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:
Justine Tunney 2022-04-07 00:15:35 -07:00
parent 43ba3009b2
commit 29bf8b1a30
73 changed files with 888 additions and 269 deletions

View file

@ -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"