MachineCloneVM::run() is 24KB of spaghetti code!

Discussions related to using the OSE version of VirtualBox.

MachineCloneVM::run() is 24KB of spaghetti code!

Postby Technologov » 11. May 2015, 20:13

24 kilobytes in one function, yay ! Now this is _really_ HUGE. (VirtualBox v5.0.0-BETA2)

Who ordered the big plate of spaghetti code ?
And probably buggy too. See here:

VBoxSVC backend lockup on linked clone with floppy ... 15&t=67499

I will try to debug this code and see if I can understand it and split it up into manageable chunks & functions.

Plan is to split the function, and all internal functions will go to "MachineImplCloneVMlib.cpp"

Other potential bugs:
+Plus, it begins cloning, before verifying, if target *.vbox file already exists or not. We end up with semi-working differencing images, in case of linked clones.
Posts: 3313
Joined: 10. May 2007, 16:59
Location: Israel

Re: MachineCloneVM::run() is 24KB of spaghetti code!

Postby frank » 12. May 2015, 11:59

Debugging is appreciated but please don't expect that we will consider code-restructure contributions. The reason is that checking the correctness of such restructures is very difficult, therefore we rather do this ourselves.
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Location: Dresden, Germany
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows

Return to VirtualBox OSE

Who is online

Users browsing this forum: No registered users and 4 guests