简体   繁体   English

IZ3 cpp_example分段错误

[英]IZ3 cpp_example segmentation fault

I get a segfault when using the latest version of IZ3 and running the cpp_example. 使用最新版本的IZ3并运行cpp_example时出现段错误。

To reproduce: 复制:

  • Clone z3: git clone https://git01.codeplex.com/z3 克隆z3: git clone https://git01.codeplex.com/z3
  • Switch to branch interp : git checkout interp 切换到分支interpgit checkout interp
  • Build following the build instructions in README 按照README的构建说明进行构建
  • Additionally, build cpp_example : cd build ; make cpp_example 另外,构建cpp_examplecd build ; make cpp_example cd build ; make cpp_example
  • Run the cpp_example 运行cpp_example
  • Result: 结果:

     unsat core example 3 [1] 30687 segmentation fault ./cpp_example 

The cpp_example works for me if I build on master . 如果我在master构建, cpp_example对我cpp_example

I read a message on some mailing list dating from December 2012 that the interpolating version of Z3 could not be built against the latest version of Z3, but that this was a work in progress. 我从2012年12月的一些邮件列表中读到一条消息,指出无法针对最新版本的Z3构建Z3的内插版本,但这是一项正在进行的工作。

Does IZ3 still not work with Z3 version 4? IZ3仍然不能与Z3版本4一起使用吗?

If yes, are there any instructions on how to build the interpolating sources against an earlier version of Z3? 如果是,是否有关于如何针对较早版本的Z3构建插值源的说明? (Starting with: where to obtain the source code of IZ3-3.2 or whatever?) (开头:从哪里获得IZ3-3.2的源代码或其他?)

  • Edit: 编辑:
  • OS: Linux __ 2.6.37.6-24-desktop #1 SMP PREEMPT __ i686 i686 i386 GNU/Linux 操作系统: Linux __ 2.6.37.6-24-desktop #1 SMP PREEMPT __ i686 i686 i386 GNU/Linux
  • g++: g ++:

     Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/i586-suse-linux/4.5/lto-wrapper Target: i586-suse-linux Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.5 --enable-ssp --disable-libssp --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.5 --enable-linux-futex --without-system-libunwind --enable-gold --with-plugin-ld=/usr/bin/gold --with-arch-32=i586 --with-tune=generic --build=i586-suse-linux Thread model: posix 

It's unsat_core_example3() that is crashing. 正是unsat_core_example3()崩溃了。 I tracked down the problem to expr_substitution::find() proofs_enabled() == false there 我在问题中expr_substitution::find()expr_substitution::find() proofs_enabled()== false的问题

but in rewriter_tpl<Config>::visit(expr * t, unsigned max_depth) , ProofGen == true, but from the call 'm_cfg.get_subst(t, new_t, new_t_pr)', new_t_pr is uninitialized. 但是在rewriter_tpl<Config>::visit(expr * t, unsigned max_depth) ,ProofGen == true,但是从调用'm_cfg.get_subst(t,new_t,new_t_pr)'中,new_t_pr未初始化。

What valgrind has to say: valgrind必须说的是:

==26885== Conditional jump or move depends on uninitialised value(s)
==26885==    at 0x4C21802: bool rewriter_tpl<th_rewriter_cfg>::visit<true>(expr*, unsigned int) (ast.h:1562)
==26885==    by 0x4C21A77: void rewriter_tpl<th_rewriter_cfg>::process_app<true>(app*, rewriter_core::frame&) (rewriter_def.h:179)
==26885==    by 0x4C23303: void rewriter_tpl<th_rewriter_cfg>::resume_core<true>(obj_ref<expr, ast_manager>&, obj_ref<app, ast_manager>&) (rewriter_def.h:602)
==26885==    by 0x4B1EF9C: propagate_values_tactic::imp::operator()(ref<goal> const&, sref_buffer<goal, 16u>&, ref<model_converter>&, ref<proof_converter>&, obj_ref<dependency_manager<ast_manager::expr_dependency_config>::dependency, ast_manager>&) (propagate_values_tactic.cpp:128)
==26885==    by 0x4B21591: propagate_values_tactic::operator()(ref<goal> const&, sref_buffer<goal, 16u>&, ref<model_converter>&, ref<proof_converter>&, obj_ref<dependency_manager<ast_manager::expr_dependency_config>::dependency, ast_manager>&) (propagate_values_tactic.cpp:249)
==26885==    by 0x4B8BA9A: cleanup_tactical::operator()(ref<goal> const&, sref_buffer<goal, 16u>&, ref<model_converter>&, ref<proof_converter>&, obj_ref<dependency_manager<ast_manager::expr_dependency_config>::dependency, ast_manager>&) (tactical.cpp:1192)
==26885==    by 0x4B8ED2D: and_then_tactical::operator()(ref<goal> const&, sref_buffer<goal, 16u>&, ref<model_converter>&, ref<proof_converter>&, obj_ref<dependency_manager<ast_manager::expr_dependency_config>::dependency, ast_manager>&) (tactical.cpp:157)
==26885==    by 0x4B90914: and_then_tactical::operator()(ref<goal> const&, sref_buffer<goal, 16u>&, ref<model_converter>&, ref<proof_converter>&, obj_ref<dependency_manager<ast_manager::expr_dependency_config>::dependency, ast_manager>&) (tactical.cpp:170)
==26885==    by 0x4B8ED2D: and_then_tactical::operator()(ref<goal> const&, sref_buffer<goal, 16u>&, ref<model_converter>&, ref<proof_converter>&, obj_ref<dependency_manager<ast_manager::expr_dependency_config>::dependency, ast_manager>&) (tactical.cpp:157)
==26885==    by 0x4B8ED2D: and_then_tactical::operator()(ref<goal> const&, sref_buffer<goal, 16u>&, ref<model_converter>&, ref<proof_converter>&, obj_ref<dependency_manager<ast_manager::expr_dependency_config>::dependency, ast_manager>&) (tactical.cpp:157)
==26885==    by 0x4B90914: and_then_tactical::operator()(ref<goal> const&, sref_buffer<goal, 16u>&, ref<model_converter>&, ref<proof_converter>&, obj_ref<dependency_manager<ast_manager::expr_dependency_config>::dependency, ast_manager>&) (tactical.cpp:170)
==26885==    by 0x4B94C1A: exec(tactic&, ref<goal> const&, sref_buffer<goal, 16u>&, ref<model_converter>&, ref<proof_converter>&, obj_ref<dependency_manager<ast_manager::expr_dependency_config>::dependency, ast_manager>&) (tactic.cpp:179)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM