Closed VirusRushTheater closed 1 year ago
Update: I have replaced on main.cpp:982
#ifndef ASAR_SHARED
Which would be meant to CLI builds of asar (which won't include static library builds) with:
#if (!defined(ASAR_SHARED) && !defined(ASAR_STATIC))
I've tracked the error and it's because the variable
romdata_r
at interface_lib.cpp gets freed twice: First onasar_patch_begin->resetdllstuff->reseteverything
and then onasar_patch_end
because it triggers the condition where that variable is freed (again). This is where the program I'm using Asar on triggers a segmentation fault.I suggest the usage of an additional flag to check whether to free romdata_r, or making it
NULL
and check again.EDIT: I commented the block where it frees the variable in
reseteverything
and it worked properly, even though I've silenced the Sanitizer.