[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-readline] SIGSEGV in _rl_dispatch_callback()

From: rosslagerwall
Subject: Re: [Bug-readline] SIGSEGV in _rl_dispatch_callback()
Date: Sun, 9 Mar 2014 21:44:45 +0000
User-agent: Mutt/1.5.22 (2013-10-16)


(I'm not subscribed so I could not reply to the last message)

I could reproduce the issue by pressing delete twice in
examples/rl-callbacktest.  After debugging the issue, I found that when
the first delete is pressed, at some point at readline.c:747, r is -1 so
it fails to call the RL_UNSETSTATE line.  After comparing with rl-6.2, I
found the cause of the problem to be in readline.c:
 rl_dispatching = 1;
-(*map[key].function)(rl_numeric_arg * rl_arg_sign, key);
+r = (*func) (rl_numeric_arg * rl_arg_sign, key);
 rl_dispatching = 0;

The dispatcher calls rl_delete() which calls rl_ding() and returns -1
which gets stored as r and hence causes RL_STATE_MULTIKEY not to be set.
In rl-6.2, rl_delete() also returns -1 but r is not stored so it
doesn't fail.

I'm not sure as to the solution or why the change was made but it seems
to be the cause of the problem.

Cheers, and thanks for Bash and Readline
Ross Lagerwall

reply via email to

[Prev in Thread] Current Thread [Next in Thread]