mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 13:52:28 +00:00
Fix MODE=tiny build
This commit is contained in:
parent
1904a3cae8
commit
6ae18a10ba
2 changed files with 6 additions and 10 deletions
|
@ -175,7 +175,6 @@ privileged static bool kismapped(int x) {
|
||||||
|
|
||||||
privileged bool kisdangerous(const void *p) {
|
privileged bool kisdangerous(const void *p) {
|
||||||
int frame;
|
int frame;
|
||||||
if (IsTiny()) return false;
|
|
||||||
if (kisimagepointer(p)) return false;
|
if (kisimagepointer(p)) return false;
|
||||||
if (kiskernelpointer(p)) return false;
|
if (kiskernelpointer(p)) return false;
|
||||||
if (IsOldStack(p)) return false;
|
if (IsOldStack(p)) return false;
|
||||||
|
|
|
@ -97,15 +97,12 @@ textstartup void cosmo(long *sp, struct Syslib *m1) {
|
||||||
_mmi.p = _mmi.s;
|
_mmi.p = _mmi.s;
|
||||||
__mmi_lock_obj._type = PTHREAD_MUTEX_RECURSIVE;
|
__mmi_lock_obj._type = PTHREAD_MUTEX_RECURSIVE;
|
||||||
|
|
||||||
if (!IsTiny()) {
|
// record system-provided stack to memory manager
|
||||||
// record system-provided stack to memory manager
|
_mmi.i = 1;
|
||||||
_mmi.i = 1;
|
_mmi.p->x = (uintptr_t)GetStackAddr() >> 16;
|
||||||
_mmi.p->x = (uintptr_t)GetStackAddr() >> 16;
|
_mmi.p->y = (uintptr_t)(GetStackAddr() + (GetStackSize() - FRAMESIZE)) >> 16;
|
||||||
_mmi.p->y =
|
_mmi.p->size = GetStackSize();
|
||||||
(uintptr_t)(GetStackAddr() + (GetStackSize() - FRAMESIZE)) >> 16;
|
_mmi.p->prot = PROT_READ | PROT_WRITE;
|
||||||
_mmi.p->size = GetStackSize();
|
|
||||||
_mmi.p->prot = PROT_READ | PROT_WRITE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
#if IsAsan()
|
#if IsAsan()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue