fix crash on init
Some checks failed
android / build (armeabi-v7a) (pull_request) Waiting to run
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (Debug) (push) Waiting to run
android / build (x86) (pull_request) Waiting to run
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (Release) (push) Waiting to run
android / build (x86_64) (pull_request) Waiting to run
linux-arm-gcc / linux-gcc-arm (Debug) (push) Waiting to run
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (Debug) (pull_request) Waiting to run
linux-arm-gcc / linux-gcc-arm (Release) (push) Waiting to run
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (Release) (pull_request) Waiting to run
linux-arm-gcc / linux-gcc-armhf (Debug) (push) Waiting to run
linux-arm-gcc / linux-gcc-armhf (Release) (push) Waiting to run
linux-arm-gcc / linux-gcc-arm (Debug) (pull_request) Waiting to run
linux-arm-gcc / linux-gcc-arm (Release) (pull_request) Waiting to run
linux-mips-gcc / linux-gcc-mipsel (Debug) (push) Waiting to run
linux-arm-gcc / linux-gcc-armhf (Debug) (pull_request) Waiting to run
linux-mips-gcc / linux-gcc-mipsel (Release) (push) Waiting to run
linux-arm-gcc / linux-gcc-armhf (Release) (pull_request) Waiting to run
linux-mips64-gcc / linux-gcc-mips64el (Debug) (push) Waiting to run
linux-mips-gcc / linux-gcc-mipsel (Debug) (pull_request) Waiting to run
linux-mips64-gcc / linux-gcc-mips64el (Release) (push) Waiting to run
linux-mips-gcc / linux-gcc-mipsel (Release) (pull_request) Waiting to run
linux-riscv64-gcc / linux-gcc-riscv64 (Debug) (push) Waiting to run
linux-mips64-gcc / linux-gcc-mips64el (Debug) (pull_request) Waiting to run
linux-riscv64-gcc / linux-gcc-riscv64 (Release) (push) Waiting to run
linux-mips64-gcc / linux-gcc-mips64el (Release) (pull_request) Waiting to run
linux-x64-clang / linux-clang (Debug) (push) Waiting to run
linux-riscv64-gcc / linux-gcc-riscv64 (Debug) (pull_request) Waiting to run
linux-x64-clang / linux-clang (Release) (push) Waiting to run
linux-riscv64-gcc / linux-gcc-riscv64 (Release) (pull_request) Waiting to run
android / build (arm64-v8a) (pull_request) Failing after 10m7s
android / build (x86_64) (push) Failing after 10m21s
android / build (x86) (push) Failing after 10m29s
android / build (armeabi-v7a) (push) Failing after 10m39s
android / build (arm64-v8a) (push) Failing after 10m54s
linux-x64-clang / linux-clang (Release) (pull_request) Failing after 11m47s
linux-x64-clang / linux-clang (Debug) (pull_request) Failing after 11m55s
linux-x64-gcc / linux-gcc (Release) (push) Failing after 12m6s
linux-x64-gcc / linux-gcc (Debug) (push) Failing after 12m14s
linux-x86-gcc / linux-gcc (Debug) (push) Failing after 34m32s
linux-x86-gcc / linux-gcc (Release) (push) Successful in 39m10s
linux-x64-gcc / linux-gcc (Debug) (pull_request) Failing after 13m6s
linux-x64-gcc / linux-gcc (Release) (pull_request) Successful in 34m11s

This commit is contained in:
tqcq 2025-04-02 19:33:43 +08:00
parent 86f52567b7
commit acacfbe188

View File

@ -134,13 +134,13 @@ TerminateBasicRuntime()
std::mutex init_lock;
std::condition_variable init_cv;
std::thread *lib_thread;
const char *my_argv[1] = {"unknown"};
void
Init(int argc, char **argv, std::function<int(int, char **)> cb)
{
std::unique_lock<std::mutex> _(init_lock);
assert(!lib_thread && "ReInitialize!!!");
const char *my_argv[1] = {"unknown"};
if (!argv) {
argc = 1;