Skip to content

Segmentation fault when an array of records used as a parameter #732

Description

@ericsson49

Using MiniZinc Version 2.7.6 905175540, trying to compile the following code

type State = record(0..1: e);

predicate trans_closure(array[0..1] of var State: sts) =
  (sts[0].e + 1 == sts[1].e)
  ;

array[0..1] of var State: sts;
constraint trans_closure(sts);

results in

MiniZinc error: Memory violation detected (segmentation fault).
This is a bug. Please file a bug report using the MiniZinc bug tracker.

Simpler versions, like inlined predicate or predicate w/o array of records work okay.
So, the problem looks like caused by using an array of records a a predicate parameter.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

resolvedIssue is resolved and the feature or fix will be part of next release

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions