mirror of
https://github.com/libretro/mame2003-plus-libretro.git
synced 2024-11-23 16:29:44 +00:00
add asan debug and fix buffer overflow on fmopl.c (#333)
This commit is contained in:
parent
9bc690853f
commit
444cd794df
3
Makefile
3
Makefile
@ -413,7 +413,8 @@ endif
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g3
|
||||
CFLAGS += -fsanitize=address -fno-omit-frame-pointer -g -O0
|
||||
LDFLAGS += -fsanitize=address
|
||||
else
|
||||
CFLAGS += -O2 -DNDEBUG
|
||||
endif
|
||||
|
@ -1219,9 +1219,9 @@ static int init_tables(void)
|
||||
else
|
||||
sin_tab[3*SIN_LEN+i] = sin_tab[i & (SIN_MASK>>2)];
|
||||
|
||||
log_cb(RETRO_LOG_DEBUG, LOGPRE "FMOPL.C: sin1[%4i]= %4i (tl_tab value=%5i)\n", i, sin_tab[1*SIN_LEN+i], tl_tab[sin_tab[1*SIN_LEN+i]] );
|
||||
log_cb(RETRO_LOG_DEBUG, LOGPRE "FMOPL.C: sin2[%4i]= %4i (tl_tab value=%5i)\n", i, sin_tab[2*SIN_LEN+i], tl_tab[sin_tab[2*SIN_LEN+i]] );
|
||||
log_cb(RETRO_LOG_DEBUG, LOGPRE "FMOPL.C: sin3[%4i]= %4i (tl_tab value=%5i)\n", i, sin_tab[3*SIN_LEN+i], tl_tab[sin_tab[3*SIN_LEN+i]] );
|
||||
// log_cb(RETRO_LOG_DEBUG, LOGPRE "FMOPL.C: sin1[%4i]= %4i (tl_tab value=%5i)\n", i, sin_tab[1*SIN_LEN+i], tl_tab[sin_tab[1*SIN_LEN+i]] );
|
||||
// log_cb(RETRO_LOG_DEBUG, LOGPRE "FMOPL.C: sin2[%4i]= %4i (tl_tab value=%5i)\n", i, sin_tab[2*SIN_LEN+i], tl_tab[sin_tab[2*SIN_LEN+i]] );
|
||||
// log_cb(RETRO_LOG_DEBUG, LOGPRE "FMOPL.C: sin3[%4i]= %4i (tl_tab value=%5i)\n", i, sin_tab[3*SIN_LEN+i], tl_tab[sin_tab[3*SIN_LEN+i]] );
|
||||
}
|
||||
log_cb(RETRO_LOG_DEBUG, LOGPRE "FMOPL.C: ENV_QUIET= %08x (dec*8=%i)\n", ENV_QUIET, ENV_QUIET*8 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user