Hey Christian,
On Tue, May 31, 2016 at 3:18 AM, Christian Couder
<[email protected]> wrote:
> On Mon, May 30, 2016 at 8:21 PM, Pranit Bauva <[email protected]> wrote:
>> ---
>> This patch contains a bug. I have tried to identify the bug and I suppose it
>> exists in do_for_each_entry_in_dir(). I have reproduced the debugging session
>> at this link[1]. I have seen that some patches in mailing list regarding
>> iterating over refs. Will those affect this? Or is this bug fixed in those
>> patches?
>>
>> [1]: http://paste.ubuntu.com/16830752/
>
> The debug session seems to use code source from a previous version of
> this patch.
> Also it is not cear in which context you run git under gdb. What have
> you done before?
> And we don't see a crash. Could you show the crash and run the "bt"
> command in gdb to get a backtrace?
The segmentation fault will occur if I move to the next step ie.
evaluate the value entry->flag.
>> @@ -79,11 +90,42 @@ int write_terms(const char *bad, const char *good)
>> strbuf_release(&content);
>> return (res < 0) ? -1 : 0;
>> }
>> +
>> +int remove_bisect_ref(const char *refname, const struct object_id *oid,
>> + int flag, void *cb_data)
>> +{
>> + char *ref;
>> + ref = xstrfmt("refs/bisect/%s", refname);
>
> You could save one line by concatenating the 2 above lines.
Sure!
>> + if (delete_ref(ref, oid->hash, flag))
>> + return error(_("couldn't delete the ref %s\n"), ref);
>> + return 0;
>
> You need to free "ref".
Sure!
Regards,
Pranit Bauva
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html