把编译导致的free宕机问题处理了

This commit is contained in:
anod 2023-03-12 08:24:38 +08:00
parent 3717c3184e
commit c06f83642f
2 changed files with 6 additions and 6 deletions

View File

@ -38,7 +38,7 @@ endif
#---------------------------------------------------------------------------------
ARCH := -march=armv6k+vfpv2 -mtune=mpcore -mfloat-abi=hard -mtp=soft -marm -mthumb-interwork
CFLAGS := $(ARCH) -std=c17 -O2 -gdwarf-4 -flto -mword-relocations \
CFLAGS := $(ARCH) -std=c17 -O2 -gdwarf-4 -mword-relocations \
-ffunction-sections -fno-math-errno -Wall -Wextra
CFLAGS += $(INCLUDE) $(DEFINES)
@ -50,7 +50,7 @@ ASFLAGS := $(ARCH) -gdwarf-4 $(INCLUDE) $(DEFINES)
LDFLAGS = $(ARCH) -gdwarf-4 -flto -specs=../arm11.specs -Wl,-Map,$(notdir $*.map) -nostartfiles
ifeq ($(strip $(NO_DEBUG)),)
CFLAGS := $(subst -flto,,$(CFLAGS)) -fstack-protector-strong -fno-inline
CFLAGS := -fstack-protector-strong -fno-inline
CXXFLAGS := $(subst -flto,,$(CXXFLAGS)) -fstack-protector-strong -fno-inline
LDFLAGS := $(subst -flto,,$(LDFLAGS)) -fstack-protector-strong -fno-inline -Wl,-wrap=malloc,-wrap=calloc,-wrap=free
endif

View File

@ -241,7 +241,8 @@ static atp_error_t disp_str( atp_callerdata_t data, atp_counter_t, atp_linecfg_t
cfg->text = (atp_text_t)data;
return ATP_SUCCESS;
}
void log( const char *fmt, ... ) {
/*void log( const char *fmt, ... ) {
char buf[512];
ee_puts("\x1b[2J");
@ -257,7 +258,7 @@ void log( const char *fmt, ... ) {
hidScanInput();
down = hidKeysDown();
}while ( down == 0 );
}
}*/
static atp_error_t select_region( atp_callerdata_t, atp_counter_t index, atp_itemcfg_t *config )
{
@ -517,10 +518,9 @@ static atp_pageopt_t serve_on_key( atp_callerdata_t data, atp_counter_t index, a
}
if( ACHTLIB_SUCCESS != acl_select_game( serial, 0, &len ) )
{
log("select game failed");
acl_close_lib();
return WAIT_ON_ERRPAGE( display_selcht );
}log("select game done");
}
if( len == 0 )
{
acl_close_lib();