mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
fix crash in BranchEvent::compile for bootimage builds
We can't reduce a conditional branch to an unconditional jump unless both arguments to the comparison are constants *and* those constants have been resolved. The latter may not be true in the case of a bootimage build.
This commit is contained in:
parent
a2933c1f9e
commit
67cbc79613
@ -4815,7 +4815,11 @@ class BranchEvent: public Event {
|
||||
ConstantSite* secondConstant = findConstantSite(c, second);
|
||||
|
||||
if (not unreachable(this)) {
|
||||
if (firstConstant and secondConstant) {
|
||||
if (firstConstant
|
||||
and secondConstant
|
||||
and firstConstant->value->resolved()
|
||||
and secondConstant->value->resolved())
|
||||
{
|
||||
int64_t firstValue = firstConstant->value->value();
|
||||
int64_t secondValue = secondConstant->value->value();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user