MachineCloneVM::run() is 24KB of spaghetti code!
Posted: 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
viewtopic.php?f=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.
Who ordered the big plate of spaghetti code ?
And probably buggy too. See here:
VBoxSVC backend lockup on linked clone with floppy
viewtopic.php?f=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.