birdc 2.0.0 crashes

Vincent Bernat bernat at luffy.cx
Thu Dec 14 16:59:43 CET 2017


 ❦ 14 décembre 2017 16:48 +0100, Clemens Schrimpe <clemens.schrimpe at gmail.com> :

> Nope - it is 2:
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff79b6a0b in previous_history () at /build/readline6-RKA9OI/readline6-6.3/history.c:185
> 185	/build/readline6-RKA9OI/readline6-6.3/history.c: No such file or directory.
> (gdb) p history_offset
> $1 = 2
> (gdb) p *(the_history[2])
> Cannot access memory at address 0x10
>
> We are up to something! :-)
>
> 	-c

You could start birdc from gdb:

gbd --args birdc

Then, add a watchpoint on history_offset:

watch history_offset

Then "run". Each time gdb stops because history_offset changed, grab a
"bt". Maybe it's not initialized to 0 properly? It should be increased
by add_history calls.

I don't see anything suspicious in bird about all that (it's all handled
by libreadline itself).
-- 
Make input easy to proofread.
            - The Elements of Programming Style (Kernighan & Plauger)



More information about the Bird-users mailing list