summary refs log tree commit diff stats
path: root/results/scraper/box64/60
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-07-16 14:55:48 +0200
committerChristian Krinitsin <mail@krinitsin.com>2025-07-16 14:55:48 +0200
commit63d2e9d409831aa8582787234cae4741847504b7 (patch)
tree595fae753d2eb293437226eaab2eed208463f132 /results/scraper/box64/60
parent2843bb65aeaeb86eb89bf3d9690db61b9dc6306e (diff)
downloadqemu-analysis-63d2e9d409831aa8582787234cae4741847504b7.tar.gz
qemu-analysis-63d2e9d409831aa8582787234cae4741847504b7.zip
add box64 bug reports box64
Diffstat (limited to 'results/scraper/box64/60')
-rw-r--r--results/scraper/box64/6037
1 files changed, 37 insertions, 0 deletions
diff --git a/results/scraper/box64/60 b/results/scraper/box64/60
new file mode 100644
index 000000000..083deb05e
--- /dev/null
+++ b/results/scraper/box64/60
@@ -0,0 +1,37 @@
+Two potential deadlock errors due to the unreleased lock &mutex_mmap
+Dear developers:

+             Thank you for your checking. Similarly, in the function AllocDynarecMap, the lock &mutex_mmap also may not be released.  The fix is to insert pthread_mutex_unlock(&mutex_mmap); before returning.

+

+https://github.com/ptitSeb/box64/blob/f000951fc970708bfa0dd5d357a334b8cfc41eb0/src/custommem.c#L436

+

+

+

+```

+uintptr_t AllocDynarecMap(dynablock_t* db, size_t size)

+{

+    if(!size)

+        return 0;

+    if(size>MMAPSIZE-2*sizeof(blockmark_t)) {

+        #ifndef USE_MMAP

+        pthread_mutex_lock(&mutex_mmap);  // here

+        void *p = NULL;

+        if(posix_memalign(&p, box64_pagesize, size)) {

+            dynarec_log(LOG_INFO, "Cannot create dynamic map of %zu bytes\n", size);

+            return 0;   // return without releasing

+        }

+        mprotect(p, size, PROT_READ | PROT_WRITE | PROT_EXEC);

+        #else

+        void* p = mmap(NULL, size, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);

+        if(p==(void*)-1) {

+            dynarec_log(LOG_INFO, "Cannot create dynamic map of %zu bytes\n", size);

+            return 0;  // return without releasing

+        }

+        #endif

+        ...;

+

+    return ret;

+}

+```

+

+

+Best,