Package: flatzinc Version: 4.4.0-4 Severity: important Tags: upstream Dear Maintainer,
fzn-gecode segmentation faults on most input .fzn files, rendering it mostly unusable. Running the following commands reproduce the segmentation fault (behaviour is not exclusive to this file): $ mzn2fzn /usr/share/doc/examples/functions/warehouses.mzn -O- -o warehouses.fzn $ fzn-gecode warehouses.fzn An example of a file that does not cause a segfault is: /usr/share/doc/minizinc/new_syntax/extended_let.mzn This appears to also affect the upstream 4.4.0 release when compiled on the same system. GDB backtrace is attached. -- System Information: Debian Release: 9.0 APT prefers testing-debug APT policy: (500, 'testing-debug'), (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.9.0-2-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages flatzinc depends on: ii libc6 2.24-10 ii libgcc1 1:6.3.0-14 ii libgecode41v5 4.4.0-4 ii libgecodeflatzinc41v5 4.4.0-4 ii libgecodegist41v5 4.4.0-4 ii libstdc++6 6.3.0-14 flatzinc recommends no packages. flatzinc suggests no packages. -- no debconf information *** backtrace.txt user@debian:~/Desktop/flatzinc-debugging$ mzn2fzn /usr/share/doc/minizinc/examples/functions/warehouses.mzn -o ./warehouses.fzn -O- user@debian:~/Desktop/flatzinc-debugging$ gdb fzn-gecode GNU gdb (Debian 7.12-6) 7.12.0.20161007-git Copyright (C) 2016 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 fzn-gecode...Reading symbols from /usr/lib/debug/.build-id/98/163b16bd01cfce89b50186d369bd0086c05a77.debug...done. done. (gdb) run warehouses.fzn Starting program: /usr/bin/fzn-gecode warehouses.fzn [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. __cxxabiv1::__dynamic_cast (src_ptr=src_ptr@entry=0x0, src_type=src_type@entry=0x555555759ad0 <typeinfo for Gecode::FlatZinc::AST::Node>, dst_type=dst_type@entry=0x7ffff7dd7258 <typeinfo for Gecode::FlatZinc::AST::Array>, src2dst=src2dst@entry=0) at ../../../../src/libstdc++-v3/libsupc++/dyncast.cc:50 50 ../../../../src/libstdc++-v3/libsupc++/dyncast.cc: No such file or directory. (gdb) bt #0 __cxxabiv1::__dynamic_cast (src_ptr=src_ptr@entry=0x0, src_type=src_type@entry=0x555555759ad0 <typeinfo for Gecode::FlatZinc::AST::Node>, dst_type=dst_type@entry=0x7ffff7dd7258 <typeinfo for Gecode::FlatZinc::AST::Array>, src2dst=src2dst@entry=0) at ../../../../src/libstdc++-v3/libsupc++/dyncast.cc:50 #1 0x00007ffff7b8c658 in Gecode::FlatZinc::AST::Node::hasAtom (this=0x0, id="output_var") at ./gecode/flatzinc/ast.hh:326 #2 0x00007ffff7bb2b66 in yyparse ( parm=parm@entry=0x7fffffffda00) at gecode/flatzinc/parser.yxx:628 #3 0x00007ffff7bbb9ef in Gecode::FlatZinc::parse ( filename="warehouses.fzn", p=..., err=..., fzs=<optimized out>, rnd=<optimized out>) at gecode/flatzinc/parser.yxx:416 #4 0x0000555555557256 in main (argc=<optimized out>, argv=<optimized out>) at tools/flatzinc/fzn-gecode.cpp:68 (gdb)