Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UVSELP: segfaults using GCC 6+ or CLANG [TESTS] #132

Open
dennisguse opened this issue Jan 9, 2019 · 0 comments
Open

UVSELP: segfaults using GCC 6+ or CLANG [TESTS] #132

dennisguse opened this issue Jan 9, 2019 · 0 comments

Comments

@dennisguse
Copy link
Member

dennisguse commented Jan 9, 2019

UVSELP segfaults using newer compilers (Debian 9, MacOS: gcc and clang)
TravisCI with Ubuntu 14.04 works.

To investigate the problem, I compiled UVSELP with debug flags (-g) and found that the error is triggered by the pointer *gsp0Ptr in excite.c:70.

This pointer is derived from function parameters: gsp0Ptr = GSP0_TABLE + GSP0_TERMS * gsp0.

It feels as if gsp0 is handled differently by the newer compilers...
Or that the width changed.

NOTE: sadly the code is undocumented.

GDB output:

user@noname:~/hack/STL/src/is54$ gdb --args "/home/user/hack/STL/bin/uvselp" -q -nolog -pf test_data/voice.src test_data/voice-pf.rek
Reading symbols from /home/user/hack/STL/bin/uvselp...done.
(gdb) run
Starting program: /home/user/hack/STL/bin/uvselp -q -nolog -pf test_data/voice.src test_data/voice-pf.rek
***************************************************************

           (C) Copyright 1990, Motorola Inc., U.S.A.

***************************************************************
Input speech file: ........ test_data/voice.src
Output speech file: ....... test_data/voice-pf.rek

Program received signal SIGSEGV, Segmentation fault.
0x000055555555684c in EXCITE (gsp0=357913773, lag=0, rs00=0, rs11=3.68934881e+19, rs22=-0, 
    pVecPtr=0x5555557765f0, x1VecPtr=0x5555557774d0, x2VecPtr=0x555555777590, 
    oPtr=0x555555777898) at /home/user/hack/STL/src/is54/excite.c:70
70	  gamma2 = 0.5 * rs22 * *gsp0Ptr;
(gdb) bt
#0  0x000055555555684c in EXCITE (gsp0=357913773, lag=0, rs00=0, rs11=3.68934881e+19, 
    rs22=-0, pVecPtr=0x5555557765f0, x1VecPtr=0x5555557774d0, x2VecPtr=0x555555777590, 
    oPtr=0x555555777898) at /home/user/hack/STL/src/is54/excite.c:70
#1  0x000055555556c566 in T_SUB (sfIndex=2) at /home/user/hack/STL/src/is54/t_sub.c:193
#2  0x000055555556e44f in main (argc=3, argv=0x7fffffffe360)
    at /home/user/hack/STL/src/is54/vselp.c:510
(gdb) 
@dennisguse dennisguse added this to the STL2018 milestone Jan 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant