"Not all catch info was assigned to a landing pad!"' failed

Hi,

My transformation phase inserts an if-the-else construct into a BB.
If that BB contains llvm.eh.exception, I get an Assertion at some later point:

lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp:212: void llvm::FunctionLoweringInfo::clear(): Assertion `CatchInfoFound.size() == CatchInfoLost.size() && “Not all catch info was assigned to a landing pad!”’ failed.

Is there some rule that forbids splitting BBs with EH?
Or maybe something special needs to be done when splitting such BB?

The code is here: http://code.google.com/p/address-sanitizer/source/browse/trunk/llvm/AddressSanitizer.cpp , see splitBlockAndInsertIfThen

Thanks,

–kcc

Hi Kostya,

My transformation phase inserts an if-the-else construct into a BB.
If that BB contains llvm.eh.exception, I get an Assertion at some later point:

lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp:212:
void llvm::FunctionLoweringInfo::clear(): Assertion `CatchInfoFound.size() ==
CatchInfoLost.size() && "Not all catch info was assigned to a landing pad!"'
failed.

Is there some rule that forbids splitting BBs with EH?
Or maybe something special needs to be done when splitting such BB?

sadly the code generators can only handle the case in which the eh.selector call
is in the landing pad (or in the basic block following it). I suggest you put
your branch after the calls to eh.exception and eh.selector.

Ciao, Duncan.

Hi Kostya,

My transformation phase inserts an if-the-else construct into a BB.
If that BB contains llvm.eh.exception, I get an Assertion at some later point:

lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp:212:
void llvm::FunctionLoweringInfo::clear(): Assertion `CatchInfoFound.size() ==
CatchInfoLost.size() && “Not all catch info was assigned to a landing pad!”’
failed.

Is there some rule that forbids splitting BBs with EH?
Or maybe something special needs to be done when splitting such BB?

sadly the code generators can only handle the case in which the eh.selector call
is in the landing pad (or in the basic block following it). I suggest you put
your branch after the calls to eh.exception and eh.selector.

Thanks!
–kcc