lmslib: command_script_interpreter_thread crashes in exec_task, probably related to the file-descriptor fd or general threading issue
fd
might possibly be passed to the thread in a bad(tm) way? Or general threading issue?
command_script_interpreter_thread is not widely used which could have caused the bug to survive this long.
Problem only occurs in task execution that might mean that something (fd
?) is not correctly preserved as the thread ends.
Avoid using command_script_interpreter_thread
use command_script_interpreter
instead untl fixx.
gdb says SEGFAULT and bt:
#0 0x00027ba8 in wok (barf=0x7effee6c, fd=0x764008a4) at file.c:120
#1 0x00028408 in fdprintf (fd=0x764008a4,
fmt=0x39ff4 "\nCMD#%d: %s: %s: %s\n") at file.c:272
#2 0x000322f4 in command_interpreter (barf=0x4c450 <barf>, fd=0x764008a4,
level=3, is_interactive=0, instr=0x75002230 "floff") at cmd.c:987
#3 0x00026abc in exec_task (barf=0x4c450 <barf>) at task.c:324
#4 0x000140b8 in ud (barf=0x4c450 <barf>) at ud.c:182
#5 0x00014a28 in main (argc=3, argv=0x7efff0d4) at ud.c:453