Yeah, whether or not va_start/va_arg/etc are nondestructive is completely an
implementation detail, could vary with arch, compiler, stack layout etc. You
have to use va_copy() if you want to use a va_list twice.


On Tue, Feb 16, 2010 at 04:36:36PM -0800, Micah Cowan wrote:
> The problem was that I was using the same va_list twice, in
> window_copy_vadd; the first time uselessly in an xvasprintf whose result
> I never used (relic of a an approach I initially started with, but
> abandoned for the current use). No idea why it seemed to "work" okay in
> 32-bit, but anyway, obviously dangerous code.
> 
> This new patch fixes the goof.
> 
> -mjc
> 
> Micah Cowan wrote:
> > WARNING WARNING WARNING
> > 
> > While this patch seems to work fine on two of my laptops running 32-bit
> > Ubuntu Karmic Koala (9.04), there seem to be stability issues when
> > running from my work desktop running 64-bit Ubuntu Hardy Heron (8.04).
> > For me, the symptoms are that the "showb" command produces
> > garbledy-gook, and the "info" command causes tmux to dump core (from
> > within a strlen() from within a xvasprintf, within window_copy_vadd
> > (with innocuous arguments). This smells like memory corruption or
> > reading of bad data. I don't experience these problems without my patch.
> > Hold off applying it in CVS until I work out what's going wrong.
> > 
> > Micah Cowan wrote:
> >> This is a code-only patch. I'll submit a separate one for the manual.
> >>
> >> This patch eliminates "output" (or "more") mode, which is used to view
> >> command output within an attached tmux client. It's the mode you use
> >> when you type <prefix> ? to get a list of bindings.



------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to