Menu

#6 spawn command bus error on HPUX 11.00 64

closed-out-of-date
None
8
2003-02-03
2002-12-13
Josh Martin
No

Using expect 5.38.0 and Tcl/Tk 8.4.1 on 64-bit HPUX
11.00
The 'spawn' command core dumps with a bus error. This
can be noticed during the spawn.test testsuite test.

I traced this to the exp_command.c file when the
Exp_SpawnCmd function tries to parse the "-open
$shannel" option. When it tries to call
Tcl_GetChannelHandle() it passes it the address of an
int (called rfd or wfd), which (on my platform) is 4
bytes wide, but Tcl_GetChannelHandle() tries to stuff a
pointer (to ClientData) into it, which is 8 bytes wide.
So I created a ClientData variable called result for
Tcl_GetChannelHandle() to interact with, and then
assigned it's value to rfd and wfd with a type cast to
int (which generates a superfluous warning).

With this patch the testsuite test now passes and
expect works fine on my platform.

As a side note, I thought that the testsuite tests were
supposed to catch bus error signals so that the test
could fail gracefully instead of dying with a core
dump, correct?

Discussion

  • Josh Martin

    Josh Martin - 2002-12-13
    • priority: 5 --> 7
     
  • Josh Martin

    Josh Martin - 2002-12-13

    A "diff -up" patch for exp_command.c for Expect 5.38.0

     
  • Josh Martin

    Josh Martin - 2002-12-13

    Logged In: YES
    user_id=200144

    The patch for "exp_main_tk.c" does not belong to this patch
    and should be deleted.

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2003-01-28
    • priority: 7 --> 8
    • assigned_to: nobody --> andreas_kupries
     
  • Andreas Kupries

    Andreas Kupries - 2003-02-03
    • status: open --> closed-out-of-date
     
  • Andreas Kupries

    Andreas Kupries - 2003-02-03

    Logged In: YES
    user_id=75003

    An equivalent patch is already present in the CVS head here
    at SF. This patch was passed to Don Libes as well.

     

Log in to post a comment.