2013/12/27 Jonathan Nieder <jrnieder@xxxxxxxxx>: > Roman Kagan wrote: > >> Subversion serf backend in versions 1.8.5 and below has a bug that the >> function creating the descriptor of a file change -- add_file() -- >> doesn't make a copy of its 3d argument when storing it on the returned > > 3d makes me think of 3-dimensional. ;-) I think you mean third > (or the abbreviation 3rd). Indeed. >> descriptor. As a result, by the time this field is used (in >> transactions of file copying or renaming) it may well be released. > > Please describe the symptom so this patch is easy to find when other > people run into it. OK > Do I remember correctly that "... released and scribbled over with a > new value, causing such-and-such assertion to fire" was what happened? Exactly. >> This patch works around this bug, by storing the value to be passed as >> the 3d argument to add_file() in a local variable with the same scope as >> the file change descriptor, making sure their lifetime is the same. > > Could this be reproduced with a test script to make sure we don't > reintroduce the bug again later? (It's okay if the test only fails on > machines with the problematic svn version.) That would need a fairly fancy setup phase, as the bug triggers only on http(s)-accessed svn repositories. I'll take a look if there's something already available in the existing test scripts; writing one from scratch for this specific case is IMO beyond the reasonable effort. > Modulo the confusing 3-dimensional arguments in comments, the code > change looks good. Thanks, I'll adjust the wording and resubmit. Roman. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html