diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6282c17..401e7e9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,12 +12,12 @@ jobs: steps: - name: Checkout repository... - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - name: Install Android NDK (r24)... - uses: nttld/setup-ndk@v1.2.0 + uses: nttld/setup-ndk@v1 with: ndk-version: r24 local-cache: true @@ -29,7 +29,7 @@ jobs: run: ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./Android.mk NDK_APPLICATION_MK=./Application.mk NDK_DEBUG=0 -j12 - name: Upload the mod! - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: AML_Libraries path: ./libs/**/libAML.so diff --git a/signal.cpp b/signal.cpp index ebad6f1..cfe3d19 100644 --- a/signal.cpp +++ b/signal.cpp @@ -218,7 +218,7 @@ void Handler(int sig, siginfo_t *si, void *ptr) DEVVAR_LOG(g_bNoModsInLog); DEVVAR_LOG(g_bDumpAllThreads); DEVVAR_LOG(g_bEHUnwind); DEVVAR_LOG(g_bMoreRegsInfo); g_pLogFile << std::endl; g_pLogFile << "Exception Signal " << sig << " - " << SignalEnum(sig) << " (" << CodeEnum(sig, si->si_code) << ")" << std::endl; - g_pLogFile << "Fault address: 0x" << std::hex << std::uppercase << faultAddr << std::nouppercase << std::endl; + g_pLogFile << "Fault address: 0x" << std::hex << std::uppercase << faultAddr << " / " << PC << std::nouppercase << std::endl; g_pLogFile << "A POSSIBLE (!) reason of the crash:\n- "; switch(sig) { @@ -245,8 +245,8 @@ void Handler(int sig, siginfo_t *si, void *ptr) break; } - Dl_info dlInfo; - if(dladdr((void*)PC, &dlInfo) != 0) + static Dl_info dlInfo; + if(PC && dladdr((void*)PC, &dlInfo) != 0) { // Success if(dlInfo.dli_fname) @@ -265,7 +265,7 @@ void Handler(int sig, siginfo_t *si, void *ptr) { // Unsuccess label_unsuccess: - g_pLogFile << "Program counter: Unknown Lib + 0x" << std::hex << std::uppercase << PC; + g_pLogFile << "Failed to get a library. Program counter: 0x" << std::hex << std::uppercase << PC; } if(dlInfo.dli_sname) @@ -320,7 +320,7 @@ void Handler(int sig, siginfo_t *si, void *ptr) #ifdef AML32 if(g_bMoreRegsInfo) { - Dl_info dlRegInfo; + static Dl_info dlRegInfo; SHOWREG(R0, mcontext->arm_r0); SHOWREG(R1, mcontext->arm_r1); SHOWREG(R2, mcontext->arm_r2); @@ -362,7 +362,7 @@ void Handler(int sig, siginfo_t *si, void *ptr) #else if(g_bMoreRegsInfo) { - Dl_info dlRegInfo; + static Dl_info dlRegInfo; SHOWREG(X0, mcontext->regs[0]); SHOWREG(X1, mcontext->regs[1]); SHOWREG(X2, mcontext->regs[2]); @@ -462,6 +462,7 @@ void Handler(int sig, siginfo_t *si, void *ptr) { g_pLogFile << "\n----------------------------------------------------\nPrinting " << std::dec << STACKDUMP_SIZE << " bytes of stack:" << std::endl; g_pLogFile << std::hex << std::uppercase; + g_pLogFile.flush(); for(int i = 1; i <= STACKDUMP_SIZE; ++i) { g_pLogFile << " " << std::setfill('0') << std::setw(2) << (int)(stack[i - 1]); @@ -555,4 +556,4 @@ void StartSignalHandler() HANDLESIG(SIGILL); HANDLESIG(SIGSTKFLT); HANDLESIG(SIGTRAP); -} \ No newline at end of file +}