When I compile the current DSPSR master the resulting binary always segfaults. Target is Ubuntu 18.04 with gcc 7.3
Tried without configure flags or backends and all backends enabled.
$ ~/Work/dspsr/Signal/Pulsar/dspsr ~/tmp/tutorial.fil
buffer overflow detected : /home/gijs/Work/dspsr/Signal/Pulsar/dspsr terminated
[1] 30545 abort (core dumped) ~/Work/dspsr/Signal/Pulsar/dspsr ~/tmp/tutorial.fil
a gdb backtrace gives:
$ gdb ~/Work/dspsr/Signal/Pulsar/dspsr ./core
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/gijs/Work/dspsr/Signal/Pulsar/dspsr...done.
[New LWP 30545]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/home/gijs/Work/dspsr/Signal/Pulsar/dspsr /home/gijs/tmp/tutorial.fil'.
Program terminated with signal SIGABRT, Aborted.0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) backtrace0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
1 0x00007fb34b292801 in __GI_abort () at abort.c:79
2 0x00007fb34b2db897 in __libc_message (action=action@entry=(do_abort | do_backtrace), fmt=fmt@entry=0x7fb34b408988 " %s : %s terminated\n")
at ../sysdeps/posix/libc_fatal.c:1813 0x00007fb34b386cff in GI_fortify_fail_abort (need_backtrace=need_backtrace@entry=true, msg=msg@entry=0x7fb34b408905 "buffer overflow detected")
at fortify_fail.c:334 0x00007fb34b386d21 in GI_fortify_fail (msg=msg@entry=0x7fb34b408905 "buffer overflow detected") at fortify_fail.c:44
5 0x00007fb34b384a10 in GI_chk_fail () at chk_fail.c:28
6 0x00007fb34b383f29 in _IO_str_chk_overflow (fp=<optimized out="">, c=<optimized out="">) at vsprintf_chk.c:31</optimized></optimized>
7 0x00007fb34b2e0494 in GIIO_default_xsputn (f=0x7ffeac124880, data=<optimized out="">, n=16) at genops.c:417</optimized>
8 0x00007fb34b2d22fe in GIIO_padn (fp=fp@entry=0x7ffeac124880, pad=pad@entry=32, count=count@entry=239) at iopadn.c:56
9 0x00007fb34b2acc0d in printf_positional (s=s@entry=0x7ffeac124880, format=format@entry=0x55993109ecda "%-.s",
readonly_format=readonly_format@entry=0, ap=ap@entry=0x7ffeac1249c0, ap_savep=ap_savep@entry=0x7ffeac124428, done=1, done@entry=0, nspecs_done=0, lead_str_end=<optimized out>, work_buffer=<optimized out>, save_errno=<optimized out>, grouping=<optimized out>, thousands_sep=<optimized out>) at vfprintf.c:202310 0x00007fb34b2aecba in _IO_vfprintf_internal (s=s@entry=0x7ffeac124880, format=format@entry=0x55993109ecda "%-.s", ap=ap@entry=0x7ffeac1249c0)
at vfprintf.c:168811 0x00007fb34b383fcb in ___vsprintf_chk (s=0x7ffeac124b65 ' ' <repeats 13="" times="">, flags=1, slen=14, format=0x55993109ecda "%-.s",</repeats>
args=args@entry=0x7ffeac1249c0) at vsprintf_chk.c:8212 0x00007fb34b383efa in ___sprintf_chk (s=<optimized out="">, flags=<optimized out="">, slen=<optimized out="">, format=<optimized out="">) at sprintf_chk.c:31</optimized></optimized></optimized></optimized>
13 0x00005599310581f2 in tci_file_hdr_init ()
14 0x0000559931058600 in tci_file_open ()
15 0x0000559931050092 in dsp::S2File::is_valid(char const*) const ()
16 0x0000559931009acd in dsp::File::create(char const*) ()
17 0x0000559930fcd8bc in dsp::SingleThread::Config::open(int, char**) ()
18 0x0000559930f4beb7 in main ()
ugh, i didn't use the formatting properly and now I can't edit this report, sorry about that.