FreeBSD Bugzilla – Attachment 244185 Details for
Bug 272991
emulators/virtualbox-ose-additions: build failed on 14-current "error: no member named 'auto_ptr' in namespace 'std'"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to workaround panic on the INVARIANTS kernel
emulators-virtualbox-ose-additions-workaround-on-the.patch (text/plain), 3.98 KB, created by
takahiro.kurosawa
on 2023-08-18 06:42:36 UTC
(
hide
)
Description:
Patch to workaround panic on the INVARIANTS kernel
Filename:
MIME Type:
Creator:
takahiro.kurosawa
Created:
2023-08-18 06:42:36 UTC
Size:
3.98 KB
patch
obsolete
>From 29ae6d72c0e5c86f5b82edf7ba2bab9497f47ef8 Mon Sep 17 00:00:00 2001 >From: KUROSAWA Takahiro <takahiro.kurosawa@gmail.com> >Date: Fri, 18 Aug 2023 13:47:50 +0900 >Subject: [PATCH] emulators/virtualbox-ose-additions: workaround on the > INVARIANTS kernel > >Add the INVARIANTS option to workaround the kernel panic on the kernel >with the INVARIANTS option enabled. >This option should be disabled by default because: >* INVARIANTS is only enabled on current; people running it should know > what they are doing >* panic does not seems to result from the implementation of vboxguest > but from the kernel bug >* the patch added by this commit might not be safe >* Giant locking is going to be removed and the patch will become useless > when the Giant in module_register_init() is removed. >--- > emulators/virtualbox-ose-additions/Makefile | 8 +++- > ...x_Additions_common_VBoxGuest_VBoxGuest.cpp | 45 +++++++++++++++++++ > 2 files changed, 52 insertions(+), 1 deletion(-) > create mode 100644 emulators/virtualbox-ose/files/extrapatch-src_VBox_Additions_common_VBoxGuest_VBoxGuest.cpp > >diff --git a/emulators/virtualbox-ose-additions/Makefile b/emulators/virtualbox-ose-additions/Makefile >index 6a2e8cbd2916..520b0be2ba9b 100644 >--- a/emulators/virtualbox-ose-additions/Makefile >+++ b/emulators/virtualbox-ose-additions/Makefile >@@ -47,10 +47,12 @@ CONFLICTS_INSTALL= virtualbox-ose \ > virtualbox-ose-lite \ > virtualbox-ose-nox11 > >-OPTIONS_DEFINE= DBUS DEBUG X11 >+OPTIONS_DEFINE= DBUS DEBUG X11 INVARIANTS > OPTIONS_DEFAULT= DBUS X11 > OPTIONS_SUB= yes > >+INVARIANTS_DESC= Workaround panic on the INVARIANTS kernel >+ > DBUS_CONFIGURE_OFF= --disable-dbus > DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus > DEBUG_CONFIGURE_ON= --build-debug >@@ -88,6 +90,10 @@ KMK_CONFIG+= VBOX_LIBPATH_X11=${LOCALBASE} VBOX_FREEBSD_SRC=${SRC_BASE}/sys > VBOX_WITH_X11= > .endif > >+.if ${PORT_OPTIONS:MINVARIANTS} >+EXTRA_PATCHES+= ${PATCHDIR}/extrapatch-src_VBox_Additions_common_VBoxGuest_VBoxGuest.cpp >+.endif >+ > .include <bsd.port.pre.mk> > > post-patch: >diff --git a/emulators/virtualbox-ose/files/extrapatch-src_VBox_Additions_common_VBoxGuest_VBoxGuest.cpp b/emulators/virtualbox-ose/files/extrapatch-src_VBox_Additions_common_VBoxGuest_VBoxGuest.cpp >new file mode 100644 >index 000000000000..fa14a8f15032 >--- /dev/null >+++ b/emulators/virtualbox-ose/files/extrapatch-src_VBox_Additions_common_VBoxGuest_VBoxGuest.cpp >@@ -0,0 +1,45 @@ >+--- src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp.orig 2023-07-13 00:59:32.000000000 +0900 >++++ src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp 2023-08-18 12:53:26.211208000 +0900 >+@@ -2540,6 +2540,10 @@ >+ >+ AssertCompile(RT_INDEFINITE_WAIT == (uint32_t)RT_INDEFINITE_WAIT); /* assumed by code below */ >+ >++#include <sys/proc.h> >++#include <sys/mutex.h> >++#include <sys/signalvar.h> >++ >+ /** Worker for vgdrvHgcmAsyncWaitCallback*. */ >+ static int vgdrvHgcmAsyncWaitCallbackWorker(VMMDevHGCMRequestHeader volatile *pHdr, PVBOXGUESTDEVEXT pDevExt, >+ bool fInterruptible, uint32_t cMillies) >+@@ -2589,12 +2593,31 @@ >+ } >+ RTSpinlockRelease(pDevExt->EventSpinlock); >+ >++ /* XXX Workaround panic on the INVARIANTS kernel. */ >++ if (mtx_owned(&Giant) && cMillies == RT_INDEFINITE_WAIT) { >++ for (;;) { >++ if (fInterruptible) >++ rc = RTSemEventMultiWaitNoResume(pWait->Event, 0); >++ else >++ rc = RTSemEventMultiWait(pWait->Event, 0); >++ if (rc == VERR_SEM_DESTROYED) >++ return rc; >++ if (rc != VERR_TIMEOUT) >++ break; >++ if (fInterruptible && SIGPENDING(curthread)) { >++ rc = VERR_INTERRUPTED; >++ break; >++ } >++ DELAY(10); >++ } >++ } else { >+ if (fInterruptible) >+ rc = RTSemEventMultiWaitNoResume(pWait->Event, cMillies); >+ else >+ rc = RTSemEventMultiWait(pWait->Event, cMillies); >+ if (rc == VERR_SEM_DESTROYED) >+ return rc; >++ } >+ >+ /* >+ * Unlink, free and return. >-- >2.41.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
grahamperrin
:
maintainer-approval?
(
vbox
)
Actions:
View
|
Diff
Attachments on
bug 272991
:
244159
|
244169
| 244185