Wind River Support Network

HomeDefectsLIN8-7896
Fixed

LIN8-7896 : libexpect is broken

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

Description

The spawn family of calls in libexpect seg faults.

This issue is documented here

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588817

And there's a suggested patch fix here

http://pkgs.fedoraproject.org/cgit/rpms/expect.git/commit/?h=master&id=b6737eed550be93182f2ed194e836a6cbbcf4fa3

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 libexpect5.45.so[7fd9ffce8000+2c000]
Segmentation fault

Other Downloads


Live chat
Online