Skip to content

Or-ing of booleans with BoolExpr causes SEGV #139

Description

@yurivict

Describe the bug

This code pattern:

  BoolExpr sum;
  sum = sum || (var1 && var2);
  sum = sum || (var3 && var4);
  rel(*this, sum);

always causes crash:

Program received signal SIGSEGV, Segmentation fault.
Address not mapped to object.
0x0000000800db2247 in ?? () from /usr/local/lib/libgecodeminimodel.so.51
(gdb) bt
#0  0x0000000800db2247 in ?? () from /usr/local/lib/libgecodeminimodel.so.51
#1  0x0000000800db2384 in ?? () from /usr/local/lib/libgecodeminimodel.so.51
#2  0x0000000800db2384 in ?? () from /usr/local/lib/libgecodeminimodel.so.51
#3  0x0000000800db2384 in ?? () from /usr/local/lib/libgecodeminimodel.so.51
#4  0x0000000800db2e1e in Gecode::BoolExpr::rel(Gecode::Home, Gecode::IntPropLevels const&) const () from /usr/local/lib/libgecodeminimodel.so.51
#5  0x0000000800db3ee1 in Gecode::rel(Gecode::Home, Gecode::BoolExpr const&, Gecode::IntPropLevels const&) () from /usr/local/lib/libgecodeminimodel.so.51

But this code succeeds:

  BoolExpr sum;
  sum = (var1 && var2);
  sum = sum || (var3 && var4);
  rel(*this, sum);

BoolExpr doesn't seem to accept a boolean initializer, like LinIntExpr accepts an integer initializer.

Is boolean initialization forgotten, or what might be a solution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions