Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Solaris 10 64bit build of zsh 4.3.17 crashes on cursor right



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



Messages sorted by: Reverse Date, Date, Thread, Author