Fix build breakage in MODE=dbg

This commit is contained in:
Justine Tunney 2022-06-15 19:13:47 -07:00
parent e466dd0553
commit fae2a17d2c
6 changed files with 57 additions and 30 deletions

View file

@ -23,15 +23,18 @@
noasan bool AreMemoryIntervalsOk(const struct MemoryIntervals *mm) {
/* asan runtime depends on this function */
int i;
size_t wantsize;
for (i = 0; i < mm->i; ++i) {
if (mm->p[i].y < mm->p[i].x) {
STRACE("AreMemoryIntervalsOk() y should be >= x!");
return false;
}
if (!(mm->p[i].size <=
(size_t)(mm->p[i].y - mm->p[i].x) * FRAMESIZE + FRAMESIZE &&
mm->p[i].size > (size_t)(mm->p[i].y - mm->p[i].x) * FRAMESIZE)) {
STRACE("AreMemoryIntervalsOk() size is wrong!");
wantsize = (size_t)(mm->p[i].y - mm->p[i].x) * FRAMESIZE;
if (!(wantsize < mm->p[i].size && mm->p[i].size <= wantsize + FRAMESIZE)) {
STRACE("AreMemoryIntervalsOk(%p) size is wrong!"
" %'zu not within %'zu .. %'zu",
(uintptr_t)mm->p[i].x << 16, mm->p[i].size, wantsize,
wantsize + FRAMESIZE);
return false;
}
if (i) {

View file

@ -96,6 +96,13 @@ o/$(MODE)/libc/calls/mkntenvblock.o: \
-ffreestanding \
-fno-sanitize=address
# we can't use sanitizers because:
# windows owns the data structure
o/$(MODE)/libc/calls/wincrash.o \
o/$(MODE)/libc/calls/ntcontext2linux.o: \
OVERRIDE_COPTS += \
-fno-sanitize=all
# we always want -O3 because:
# it makes the code size smaller too
o/$(MODE)/libc/calls/sigenter-freebsd.o \