zsh-workers
 help / color / mirror / code / Atom feed
* Solaris 10 64bit build of zsh 4.3.17 crashes on cursor right
@ 2012-06-18 15:16 Clemens Huebner
  2012-06-20 15:26 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Clemens Huebner @ 2012-06-18 15:16 UTC (permalink / raw)
  To: zsh-workers

Hi,

i tried sending this on my private mail account, which seems to fail, so 
i hope you den't get this triplicate.

When compiled on Solaris 10 (or earlier) as 64bit, zsh will crash every 
time cursor right is pressed.

This is due to Solaris Bug 1240072. The bug causes tgoto() not to be 
declared in term.h, if __STDC__ is set. The bug is fixed in Solaris 11, 
but not in Solaris 10 or earlier.

Due to the missing prototype, the char pointer returned by tgoto() will 
be cast to int. This works on 32bit builds, but will truncate the 
pointer on 64bit builds, as the 64 bit pointer will be cast to a 32 bit int.

tgoto() is used only once in Src/Zle/zle_refresh.c:

static void
tcoutarg(int cap, int arg)
{
     char *result;

     result = tgoto(tcstr[cap], arg, arg);

When tgoto() is manually declared in Src/Zle/zle_refresh.c, the code 
works as expected.

I am not sufficiently versed in autoconf to write a patch, though.

Regards,
Clemens


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-20 15:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-18 15:16 Solaris 10 64bit build of zsh 4.3.17 crashes on cursor right Clemens Huebner
2012-06-20 15:26 ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).