Wind River Support Network


LIN8-7896 : libexpect is broken

Created: Sep 26, 2017    Updated: Mar 4, 2019
Resolved Date: Oct 12, 2017
Found In Version:
Fix Version:
Severity: Standard
Applicable for: Wind River Linux 8
Component/s: Userspace


The spawn family of calls in libexpect seg faults.

This issue is documented here

And there's a suggested patch fix here

Steps to Reproduce

1) Create a project

$installDir/configure --enable-board=intel-x86-64 --enable-kernel=standard --enable-rootfs=glibc-small --with-package=expect --with-rcpl-version=0021

2) Export the sdk and build this source code, do not forget to use "-lexpect5.45"

#include <stdio.h>
#include <expect.h>

int main()
        exp_spawnv("ls", NULL);
        printf("Hello World\n");
        return 0;

3) Run the software on the target (I used QEMU), you will get this error

root@qemu2:~# ./a.out 
a.out[402]: segfault at 410 ip 00007fd9ffd06fee sp 00007ffd76c5c380 error 4 in[7fd9ffce8000+2c000]
Segmentation fault

Other Downloads

Live chat