AnyDSL / thorin

The Higher-Order Intermediate Representation
https://anydsl.github.io
GNU Lesser General Public License v3.0
150 stars 15 forks source link

SegFault in -emit-thorin #71

Closed richardmembarth closed 7 years ago

richardmembarth commented 7 years ago

Calling impala -emit-thorin on AnyDSL/stincilla/sorting_networks/bitonic.impala segfaults:

impala bitonic.impala -emit-thorin
module 'bitonic'

thorin/analyses/domtree.cpp:53: const thorin::CFNode* thorin::DomTreeBase<<anonymous> >::lca(const thorin::CFNode*, const thorin::CFNode*) const [with bool forward = true]: Assertion `i && j' failed.
Aborted (core dumped)
leissa commented 7 years ago

3463372a6d40b232ed35207ad5d1cb56ca26549f fixed it.

leissa commented 7 years ago

args, broken again. now we have an endless loop...

leissa commented 7 years ago

this problem only occurs, when using certain higher-order idioms. When compiling with -Othorin implied by -emit-llvm we should never run into this case.

Of course, this issue should be fixed but the thing is (long story short): Our CFA is currently too smart for the scheduler, so the scheduler gets confused. I'll postpone for 0.5 as -emit-thorin is actually more a debugging option no end user will use and fixing this issue is a bit more involved.

leissa commented 7 years ago

The last commit gets rid of the endless loop an emits a warning instead

leissa commented 7 years ago

fixed.