https://bugs.winehq.org/show_bug.cgi?id=49225
Bug ID: 49225 Summary: FreeBSD "regression" causes assertion failure in (at least) applications using Gecko plugin Product: Wine Version: 5.9 Hardware: x86 OS: FreeBSD Status: NEW Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: damjan.jov@gmail.com
My commit to get DLLs loading at correct addresses caused a regression where Wine crashes with an assertion failure when the ieframe component is loaded, eg. run 7-zip file manager, and click on Help -> Contents:
---snip--- Assertion failed: (view->protect & VPROT_SYSTEM), function create_view, file virtual.c, line 863. wine: Assertion failed at address 6235FCA3 (thread 0024), starting debugger... ---snip---
Starting the debugger fails due to permissions, but even if you do: sudo sysctl security.bsd.unprivileged_proc_debug=1 it deadlocks instead, so no stack trace is available.
This was the offending commit, by me, which exposed this bug for some applications, while fixing others:
commit 55ba3648379d90642f174e74809b84130d6d1ddc Author: Damjan Jovanovic damjan.jov@gmail.com Date: Mon May 18 21:04:58 2020 +0200
libwine: Add support for mmap at fixed start addresses on FreeBSD.
The way to implement MAP_TRYFIXED on FreeBSD is call mmap() with MAP_FIXED | MAP_EXCL, which will allocate the mapping from the exact starting address if possible, and if that fails, call mmap() again without them. This gets PE DLLs loading at their correct base addresses, and fixes a FreeBSD-specific problem with Cygwin's fork() caused by cygwin1.dll loading at different base addresses in the parent and child.
Signed-off-by: Damjan Jovanovic damjan.jov@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
M libs/wine/mmap.c