thomas-maeder / popeye

Popeye is a chess problem solving and testing software with strong support for fairy chess and heterodox genres. For more information cf. topic "Popeye (chess)" on http://en.wikipedia.org/
31 stars 14 forks source link

Incorrect sstipulation causes segfault #114

Closed thomas-maeder closed 9 years ago

thomas-maeder commented 15 years ago

Given the input file:

begi ssti black 1h (2d d# & !#d) fors 4k3/8/3K4/8/8/8/8/7Q endp

Note: mistyped '!#d' instead of '!d#'

Expected output:

Popeye Linux-2.6.24-24-generic-unknown-32Bit v4.51 (2048 KB) input-error:no stipulation specified offending item: endp fatal error:

end of file before end of problem

Actual output:

Popeye Linux-2.6.24-24-generic-unknown-32Bit v4.51 (2048 KB) Segmentation fault

'gcc -v' output:

Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu Thread model: posix gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3)

Original comment by: *anonymous

thomas-maeder commented 15 years ago

Good catch!

Original comment by: thomas-maeder

thomas-maeder commented 15 years ago

Original comment by: thomas-maeder

thomas-maeder commented 15 years ago

Fixed in the current development head and releases >4.51.

% echo 'begin ssti black 1h (2d d# & !#d) fors 4k3/8/3K4/8/8/8/8/7Q endp' | ./py Popeye Linux-2.6.27.21-0.1-default-x86_64-64Bit v4.52 (1 GB) input-error:no stipulation specified offending item: endp fatal error:

end of file before end of problem

Original comment by: thomas-maeder

thomas-maeder commented 15 years ago

Original comment by: thomas-maeder