Subject: pkg/12905: expect crashes on 64bit platform
To: None <gnats-bugs@gnats.netbsd.org>
From: None <petrov@netbsd.org>
List: netbsd-bugs
Date: 05/10/2001 18:08:17
>Number:         12905
>Category:       pkg
>Synopsis:       expect crashes on 64bit platform
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 10 18:08:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Andrey Petrov
>Release:        1.5F
>Organization:
>Environment:
NetBSD vishnu 1.5F NetBSD 1.5F (EB164) #0: Thu Sep 28 08:38:10 PDT 2000     and@vishnu:/usr/src/syssrc/sys/arch/alpha/compile/EB164 alpha

>Description:
expect core dumps doing spawn command. Problem is originated
by tcl ClientData interface when it used as pointer
and caller and callee have different ideas about variable size.
Using long instead of int eliminates this problem for this particular
case.

>How-To-Repeat:
build tcl-expect package,
make check from work/expect-5.32
>Fix:
*** exp_command.c       Mon Apr  2 19:25:22 2001
--- exp_command.c.orig  Mon Jan 31 22:38:43 2000
***************
*** 780,786 ****
         * process "-open $channel"
         */
        int mode;
!       long rfd, wfd;
        
        if (echo) {
            expStdoutLogU(argv0,0);
--- 780,786 ----
         * process "-open $channel"
         */
        int mode;
!       int rfd, wfd;
        
        if (echo) {
            expStdoutLogU(argv0,0);

>Release-Note:
>Audit-Trail:
>Unformatted: