about summary refs log tree commit diff stats
path: root/src/wrapped/wrappedlibc.c
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2025-05-08 22:49:48 +0800
committerGitHub <noreply@github.com>2025-05-08 16:49:48 +0200
commit78193c5f1acb4fd0311bbf96ed0f692016d6e350 (patch)
tree974f5798255854d960be1f89209fe12ef93fb31c /src/wrapped/wrappedlibc.c
parent51d2b73cd73cb362255820fe86503d90cdd3dcd0 (diff)
downloadbox64-78193c5f1acb4fd0311bbf96ed0f692016d6e350.tar.gz
box64-78193c5f1acb4fd0311bbf96ed0f692016d6e350.zip
[ENV] Refactored file-mapping handling (#2612)
* [ENV] Refactored file-mapping handling

* fix
Diffstat (limited to 'src/wrapped/wrappedlibc.c')
-rw-r--r--src/wrapped/wrappedlibc.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c
index fbfc9b21..631b270c 100644
--- a/src/wrapped/wrappedlibc.c
+++ b/src/wrapped/wrappedlibc.c
@@ -3032,17 +3032,7 @@ EXPORT void* my_mmap64(x64emu_t* emu, void *addr, size_t length, int prot, int f
     }
     #endif
     if(ret!=MAP_FAILED) {
-        if(emu && !(flags&MAP_ANONYMOUS) && (fd>0)) {
-            if ((box64_wine && BOX64ENV(dynarec_volatile_metadata)) || BOX64ENV(unityplayer)) {
-                char filename[4096];
-                char buf[128];
-                sprintf(buf, "/proc/self/fd/%d", fd);
-                ssize_t r = readlink(buf, filename, sizeof(filename) - 1);
-                if (r != -1) filename[r] = 0;
-
-                if (BOX64ENV(unityplayer)) DetectUnityPlayer(filename);
-                if (box64_wine && BOX64ENV(dynarec_volatile_metadata)) ParseVolatileMetadata(filename, addr);
-            }
+        if (emu && !(flags & MAP_ANONYMOUS) && (fd > 0)) {
             // the last_mmap will allow mmap created by wine, even those that have hole, to be fully tracked as one single mmap
             if((ret>=last_mmap_addr[0]) && ret+length<(last_mmap_addr[0]+last_mmap_len[0]))
                 RecordEnvMappings((uintptr_t)last_mmap_addr[0], last_mmap_len[0], fd);