Package: expect-dev
Version: 5.44.1.14-2
Severity: normal

Calling exp_popen from C causes a segfault. Here is a test program.

#include <stdio.h>
#include <tcl8.5/expect.h>

int main()
{
  FILE *pipe;
  char *some_command = "uname";
  char datum;

  pipe = exp_popen(some_command);
  while ((datum = getc (pipe)) != EOF)
    printf("%c",datum);
}

Here are the last few lines of the strace output.

open("/dev/tty", O_RDWR)                = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(3, TIOCGWINSZ, {ws_row=42, ws_col=142, ws_xpixel=852, ws_ypixel=546}) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Segmentation fault

The segfault occurs before attempting to read from the stream. This is
100% repeatable and started happening since expect-dev was upgraded on
10/27/09. This program works correctly on a system with the previous
versions (substituting #include <tcl8.4/expect.h> above).

$ gcc usexpect.c -lexpect
$ a.out
Linux


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-1-686-bigmem (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages expect-dev depends on:
ii  expect                       5.44.1.14-2 A program that can automate intera
ii  tcl8.5-dev                   8.5.7-1     Tcl (the Tool Command Language) v8

Versions of packages expect-dev recommends:
ii  expectk                      5.44.1.14-2 A program that can automate intera
ii  tk8.5-dev                    8.5.7-1     Tk toolkit for Tcl and X11, v8.5 -

expect-dev suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to