Skip to content

Z3 segfaults instead of erroring out when passing the wrong type parameters to Z3.Datatype.mk_sort_ref_p #8376

@mben-romdhane

Description

@mben-romdhane

I'm going to be using ML syntax here, but not sure if this is an issue specific to the ml API. If you declare your types using Z3.Datatype.mk_datatypes (so no type parameters), but reference them using type parameters, Z3 segfaults instead of erroring out. This is the stack trace:

Datatype::util::get_sort_size(ref_vector<sort, ast_manager> const&, sort*) () from 4.15.4/install/lib/libz3.so           
Datatype::util::compute_datatype_size_functions(svector<symbol, unsigned int> const&) () from 4.15.4/install/lib/libz3.so
Datatype::decl::plugin::end_def_block() () from 4.15.4/install/lib/libz3.so                                              
Datatype::decl::plugin::mk_datatypes(unsigned int, datatype::def* const*, unsigned int, sort* const*, ref_vector<sort, ast_manager>&) ()                          

Happy to give more data if needed!

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions