Fix MODE=tiny build

This commit is contained in:
Justine Tunney 2023-06-03 10:30:48 -07:00
parent 1904a3cae8
commit 6ae18a10ba
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
2 changed files with 6 additions and 10 deletions

View file

@ -175,7 +175,6 @@ privileged static bool kismapped(int x) {
privileged bool kisdangerous(const void *p) {
int frame;
if (IsTiny()) return false;
if (kisimagepointer(p)) return false;
if (kiskernelpointer(p)) return false;
if (IsOldStack(p)) return false;

View file

@ -97,15 +97,12 @@ textstartup void cosmo(long *sp, struct Syslib *m1) {
_mmi.p = _mmi.s;
__mmi_lock_obj._type = PTHREAD_MUTEX_RECURSIVE;
if (!IsTiny()) {
// record system-provided stack to memory manager
_mmi.i = 1;
_mmi.p->x = (uintptr_t)GetStackAddr() >> 16;
_mmi.p->y =
(uintptr_t)(GetStackAddr() + (GetStackSize() - FRAMESIZE)) >> 16;
_mmi.p->size = GetStackSize();
_mmi.p->prot = PROT_READ | PROT_WRITE;
}
// record system-provided stack to memory manager
_mmi.i = 1;
_mmi.p->x = (uintptr_t)GetStackAddr() >> 16;
_mmi.p->y = (uintptr_t)(GetStackAddr() + (GetStackSize() - FRAMESIZE)) >> 16;
_mmi.p->size = GetStackSize();
_mmi.p->prot = PROT_READ | PROT_WRITE;
#if 0
#if IsAsan()