I think I discovered what causes the crash. In apropos_in_all_indices
(indices.c) at line 605 we are freeing up some memory (free
(this_fb->contents;). If I delete these lines it works correctly but
what is the root cause of that I'm not sure. The closer I got is that
when the address of win->node->contents is 'close' to this_fb->contents
and we free the second one we also messing up with win->node->contents.
If the info file we search for is big these two could overlap.
Is something like that possible?
If I delete these lines it does not crash but since you can't reproduce
it I think more people need to test my guess.
Gavin Smith:
> On 12 July 2016 at 10:26, mtsio <[email protected]> wrote:
>> I tested it with info from SVN.
>>
>> Attached the debug info with -x 3. I think though it's not very
>> accurate. I ran info gith gdb and the last files info searched was
>> gnash_user and gnash_ref.
>
> You're right, this log doesn't tell us anything.
>
> I notice some memory leaks when doing some testing, so I am going to
> try to fix those anyway.
>
>> Maybe the bug is about preparing/showing the results of apropos not
>> about the search itself.
>
> I suggest trying "info gettext" followed by searching in the index of
> the file, like "Igettext RET". That could be a simpler way to get a
> segmentation fault so would be easier to investigate. If not, it could
> be hard to get to the root of this.
>
diff -c -L /home/mtsio/texinfo/trunk/info/indices.c -L \#\<buffer\ indices.c\> /home/mtsio/texinfo/trunk/info/indices.c /tmp/buffer-content-15032G3O
*** /home/mtsio/texinfo/trunk/info/indices.c
--- #<buffer indices.c>
***************
*** 602,610 ****
free (old_indices);
}
}
- /* Try to avoid running out of memory */
- free (this_fb->contents);
- this_fb->contents = NULL;
}
/* Build a list of the references which contain SEARCH_STRING. */
--- 602,607 ----
Diff finished. Thu Jul 14 18:47:37 2016