VirtualBox

Ticket #3048 (closed enhancement: fixed)

Opened 5 years ago

Last modified 5 years ago

some run-time asserts can be compile-time

Reported by: gdm Owned by:
Priority: minor Component: other
Version: VirtualBox 2.1.0 Keywords:
Cc: Guest type: other
Host type: other

Description

I've found a lot of run-time asserts that can be complite-time using my script placed in  http://savesources.com/public/scanStaticAssert.pl.txt

Part of output ..... /vbox/src/VBox/Devices/Storage/swab.h: Assert(sizeof(BMDMADesc) == 8); /vbox/src/VBox/Devices/Network/DrvTAPWin.cpp: Assert(sizeof(pThis->MacConfigured) == 6); /vbox/src/VBox/Devices/Network/DrvTAPWin.cpp: Assert(sizeof(pThis->abSendBuf) == RT_ALIGN_Z(sizeof(pThis->abSendBuf), 16)); /vbox/src/VBox/Devices/Graphics/DevVGAModes.h: Assert(sizeof(s->sr) >= 8); /vbox/src/VBox/Devices/Graphics/DevVGAModes.h: Assert(sizeof(s->cr) >= 24); /vbox/src/VBox/Devices/Graphics/DevVGAModes.h: Assert(sizeof(s->ar) >= 0x14); ....

Best regards, Dmytro Gorbunov  http://savesources.com

Change History

comment:1 Changed 5 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Thanks for this suggestion and we will fix some of them. However, these assertions don't cause any runtime overhead for the normal release as Assert is a nop for release builds.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use