| ... | @@ -1247,6 +1247,18 @@ const LinuxThreadImpl = struct { | ... | @@ -1247,6 +1247,18 @@ const LinuxThreadImpl = struct { |
| 1247 | : [ptr] "r" (@intFromPtr(self.mapped.ptr)), | 1247 | : [ptr] "r" (@intFromPtr(self.mapped.ptr)), |
| 1248 | [len] "r" (self.mapped.len), | 1248 | [len] "r" (self.mapped.len), |
| 1249 | : .{ .memory = true }), | 1249 | : .{ .memory = true }), |
| | 1250 | .m68k => asm volatile ( |
| | 1251 | \\ move.l #91, %%d0 // SYS_munmap |
| | 1252 | \\ move.l %[ptr], %%d1 |
| | 1253 | \\ move.l %[len], %%d2 |
| | 1254 | \\ trap #0 |
| | 1255 | \\ move.l #1, %%d0 // SYS_exit |
| | 1256 | \\ move.l #0, %%d1 |
| | 1257 | \\ trap #0 |
| | 1258 | : |
| | 1259 | : [ptr] "r" (@intFromPtr(self.mapped.ptr)), |
| | 1260 | [len] "r" (self.mapped.len), |
| | 1261 | : .{ .memory = true }), |
| 1250 | // We set `sp` to the address of the current function as a workaround for a Linux | 1262 | // We set `sp` to the address of the current function as a workaround for a Linux |
| 1251 | // kernel bug that caused syscalls to return EFAULT if the stack pointer is invalid. | 1263 | // kernel bug that caused syscalls to return EFAULT if the stack pointer is invalid. |
| 1252 | // The bug was introduced in 46e12c07b3b9603c60fc1d421ff18618241cb081 and fixed in | 1264 | // The bug was introduced in 46e12c07b3b9603c60fc1d421ff18618241cb081 and fixed in |