Skip to content

Commit ae2264d

Browse files
authored
Merge pull request #4723 from smowton/smowton/fix/ool-decision-procedure-text
Out-of-line prop_conv_solvert::decision_procedure_text to work around g++-5 bug
2 parents 24cc86a + 6976b67 commit ae2264d

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/solvers/prop/prop_conv_solver.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,3 +574,13 @@ void prop_conv_solvert::pop()
574574

575575
prop.set_assumptions(assumption_stack);
576576
}
577+
578+
// This method out-of-line because gcc-5.5.0-12ubuntu1 20171010 miscompiles it
579+
// when inline (in certain build configurations, notably -O2 -g0) by producing
580+
// a non-virtual thunk with c++03 ABI but a function body with c++11 ABI, the
581+
// mismatch leading to a missing vtable entry and consequent null-pointer deref
582+
// whenever this function is called.
583+
std::string prop_conv_solvert::decision_procedure_text() const
584+
{
585+
return "propositional reduction";
586+
}

src/solvers/prop/prop_conv_solver.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@ class prop_conv_solvert : public conflict_providert,
3939
// overloading from decision_proceduret
4040
decision_proceduret::resultt dec_solve() override;
4141
void print_assignment(std::ostream &out) const override;
42-
std::string decision_procedure_text() const override
43-
{
44-
return "propositional reduction";
45-
}
42+
std::string decision_procedure_text() const override;
4643
exprt get(const exprt &expr) const override;
4744

4845
tvt l_get(literalt a) const override

0 commit comments

Comments
 (0)