diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-04-10 18:51:07 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-04-10 18:51:16 +0200 |
| commit | 5d6307184941f6f2171153df6a5bb0105fcbce9e (patch) | |
| tree | c0c31a50eac0c58725ba8418154ca48a3c4ae2a9 /src/tools | |
| parent | 8c98c7b67580b2807d37fa03f59416f4526df770 (diff) | |
| download | box64-5d6307184941f6f2171153df6a5bb0105fcbce9e.tar.gz box64-5d6307184941f6f2171153df6a5bb0105fcbce9e.zip | |
[ELFLOADER] Improved handling of Failed-to-load library (and unloading of libs too)
Diffstat (limited to 'src/tools')
| -rwxr-xr-x | src/tools/bridge.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/bridge.c b/src/tools/bridge.c index 16aaaf74..54c380b1 100755 --- a/src/tools/bridge.c +++ b/src/tools/bridge.c @@ -61,7 +61,7 @@ brick_t* NewBrick(void* old) printf_log(LOG_NONE, "Warning, cannot allocate 0x%lx aligned bytes for bridge, will probably crash later\n", NBRICK*sizeof(onebridge_t)); } #ifdef DYNAREC - setProtection((uintptr_t)ptr, NBRICK * sizeof(onebridge_t), PROT_READ | PROT_WRITE | PROT_EXEC | PROT_NOPROT); + setProtection((uintptr_t)ptr, NBRICK * sizeof(onebridge_t), PROT_READ | PROT_WRITE | PROT_EXEC | PROT_NOPROT | PROT_MMAP); #endif dynarec_log(LOG_INFO, "New Bridge brick at %p (size 0x%zx)\n", ptr, NBRICK*sizeof(onebridge_t)); ret->b = ptr; @@ -85,6 +85,7 @@ void FreeBridge(bridge_t** bridge) x64emu_t* emu = thread_get_emu(); while(b) { brick_t *n = b->next; + dynarec_log(LOG_INFO, "FreeBridge brick at %p (size 0x%zx)\n", b->b, NBRICK*sizeof(onebridge_t)); my_munmap(emu, b->b, NBRICK*sizeof(onebridge_t)); box_free(b); b = n; |