On 2018-05-11 20:46, Eric Blake wrote: > On 05/09/2018 11:55 AM, Max Reitz wrote: >> This new test verifies that qdict_flatten() does not modify a shallow >> clone of the given QDict. >> >> Signed-off-by: Max Reitz <[email protected]> >> --- >> tests/check-qdict.c | 33 +++++++++++++++++++++++++++++++++ >> 1 file changed, 33 insertions(+) >> > > I'm not sure I even want to know how long it took you to debug the crash > that you obviously hit before adding the fix in 9/13 plus this test ;)
Thank you very much, I made myself forget about that trauma already.
In short, I wondered why the whole thing worked for null-co directly:
driver=null-co,size=512
=> {"driver": "null-co", "size": 512}
But not for null-co through raw:
driver=raw,file.driver=null-co,file.size=512
=> {"file": {}}
(Or something like that, I don't remember exactly.)
With some debugging sprinkled into block.c, I could see that the correct
options were there on the null-co level... But for some reason they
disappeared one level above.
Then I recalled that dict cloning is just a shallow cloning and looked
for the culprit...
Of course, in reality, much more cursing was involved.
Max
signature.asc
Description: OpenPGP digital signature
