Hi,

the attached one-liner diff fixes the symbol issue and enables me to run
my Virtualbox VMs again. (However, I didn't check how the addition of
this flag to CXXFLAGS affects the rest of R0 compilation - on the other
hand, it's already there in CFLAGS.)

The missing 'memset' symbol is caused by a compiler-generated call to
memset(), not by an actual call in the source code - my guess is that
g++ emits it to optimize this loop that was added for 6.1.34:

=====
--- ./virtualbox-6.1.32-dfsg/src/VBox/Devices/Network/DevE1000.cpp      
2022-01-13 19:55:54.000000000 +0100
+++ ./virtualbox-6.1.34-dfsg/src/VBox/Devices/Network/DevE1000.cpp      
2022-03-23 00:43:01.000000000 +0100
@@ -5462,6 +5543,17 @@
                 AssertMsgFailed(("Impossible descriptor type!"));
                 continue;
         }
+        if (fInvalidPacket)
+        {
+            for (int index = pThis->iTxDCurrent; index < i; ++index)
+                pThis->afTxDValid[index] = false; /* Make sure all descriptors 
for this packet are skipped by processing */
+            LogFlow(("%s e1kLocateTxPacket: marked %d descriptors as 
invalid\n", pThis->szPrf, i - pThis->iTxDCurrent));
+            LogFlow(("%s e1kLocateTxPacket: RET true cbTxAlloc=%d 
cbPacket=%d%s%s\n",
+                     pThis->szPrf, pThis->cbTxAlloc, cbPacket,
+                     pThis->fGSO ? " GSO" : "", fTSE ? " TSE" : ""));
+            pTxdc->nextPacket = i;
+            return true;
+        }
         if (pDesc->legacy.cmd.fEOP)
         {
             /*
=====

Feel free to forward upstream.

Best regards
Jan
--- a/Config.kmk	2022-04-21 01:17:47.000000000 +0200
+++ b/Config.kmk	2022-04-21 02:00:52.203003760 +0200
@@ -4509,7 +4509,7 @@
 	$(VBOX_GCC_fno-stack-protector) -fno-common $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) \
 	-fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK)
 TEMPLATE_VBoxR0_CFLAGS.amd64        = -m64 -mno-red-zone -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fasynchronous-unwind-tables -ffreestanding
-TEMPLATE_VBoxR0_CXXFLAGS.amd64      = -m64 -mno-red-zone -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fasynchronous-unwind-tables
+TEMPLATE_VBoxR0_CXXFLAGS.amd64      = -m64 -mno-red-zone -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fasynchronous-unwind-tables -ffreestanding
 TEMPLATE_VBoxR0_CXXFLAGS.freebsd    = -ffreestanding
  if $(VBOX_GCC_VERSION_CC) < 30400
   TEMPLATE_VBoxR0_DEFS             += RT_WITHOUT_PRAGMA_ONCE

Reply via email to