zsh-workers
 help / color / mirror / code / Atom feed
From: Clemens Huebner <clemens.huebner@oracle.com>
To: zsh-workers@zsh.org
Subject: Solaris 10 64bit build of zsh 4.3.17 crashes on cursor right
Date: Mon, 18 Jun 2012 17:16:43 +0200	[thread overview]
Message-ID: <4FDF465B.4020906@oracle.com> (raw)

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


             reply	other threads:[~2012-06-18 15:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-18 15:16 Clemens Huebner [this message]
2012-06-20 15:26 ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FDF465B.4020906@oracle.com \
    --to=clemens.huebner@oracle.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).