Hi Right idea but I don't think we should hide this behind a macro, especially one libevent itself could plausibly use in future.
evtimer_initialized will only work with zero'd memory so if there is a genuinely uninitialized case it needs to be changed. Cheers On Wed, Aug 29, 2012 at 08:59:45AM +0100, Thomas Adam wrote: > Hi, > > On Wed, Aug 29, 2012 at 06:47:24AM +0530, Raghavendra D Prabhu wrote: > > 532 partial_key: > > 533 /* > > 534 * Escape but no key string. If have already seen an > > escape and the > > 535 * timer has expired, give up waiting and send the escape. > > 536 */ > > 537 if ((tty->flags & TTY_ESCAPE) && > > 538 !evtimer_pending(&tty->key_timer, NULL)) { > > 539 evbuffer_drain(tty->event->input, 1); > > 540 key = '\033'; > > 541 goto handle_key; > > 548 if (evtimer_pending(&tty->key_timer, NULL)) > > > > The key_timer is uninitialized at the moment which causes the crash. > > It's slightly more complicated than that. It seems as though we were always > being a bit naughty in using events here -- your trace shows a chunk of > memory which isn't an event at all. > > I think we should be calling evtimer_pending() only when the event has been > initialised prior to checking it. See the patch below. This should fix > your problem. > > Nicholas -- I've tested this with the version of libevent reported here > (2.0.20) as well as 2.0.19, and this shows no problems. I do not know about > the 1.4.X stable releases though. > > Kindly, > > -- Thomas Adam > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users