harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor V Chebykin (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-2113) [drlvm][jit][opt] Jitrino.OPT loops infinitely in inlineJSR() when an exception from a subroutine (JSR->RET) is expected
Date Mon, 28 May 2007 04:41:15 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-2113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499474
] 

Igor V Chebykin commented on HARMONY-2113:
------------------------------------------

Egor,

> 1.
> does inlineJSRs() break if unreachable nodes are present in the graph? I think, it should
not. And if it does, can we fix it? 
> otherwise why do we need to do purgeUnreachableNodes() right before inlineJSRs() and
after?

I think this is right to check if unreachable nodes are present in the graph after some manipulation
with it.
So, we call purgeUnreachableNodes(): 1) right before inlineJSRs()  - after some previous changes
in graph and 2) after inlineJSRs(), which changes the graph too.

> 2.
> what your new algorithm does:
> if all RET nodes for a fixed JSR have no in-edges
> then we can transform JSR inst to a direct jump
> 
> I think, it is not appropriate to check reachability by only checking in-edges because
a node can be unreachable together with it's 

But purgeUnreachableNodes() clears those groups of the nodes, so all is OK

> predecessor. If that does not happen in our situation, we should prove it and add a comprehensive
comment in the code because 
> it is not obvious (at least for me:)

Thanks,
Igor.

> [drlvm][jit][opt] Jitrino.OPT loops infinitely in inlineJSR() when an exception from
a subroutine (JSR->RET) is expected
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2113
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2113
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: any
>            Reporter: Egor Pasko
>            Assignee: Alexey Varlamov
>            Priority: Minor
>         Attachments: ExcInFinallyTest.j, H2113.patch.txt, HARMONY-2113-regtest.patch,
HARMONY-2113.patch
>
>
> Jitrino.OPT loops infinitely in inlineJSR() when an exception from a subroutine (JSR->RET)
is expected
> To reproduce:
> * compile the attached hand-crafted Jasmin source ExcInFinallyTest.j:
> java -jar jasmin.jar ExcInFinallyTest.j
> * run on OPT:
> $HARMONY -Xem:opt ExcInFinallyTest
> you will get an infinite loop (in compilation). This test passes on Jitrino.JET and interpreter.
> If you rebuild Jitrino in debug mode, the following assertion would be caught:
> java: /export/users/evpasko/svn/3/trunk/working_vm/vm/jitrino/src/optimizer/FlowGraph.cpp:457:
void Jitrino::findNodesInRegion(Jitrino::Node*, Jitrino::Node*, Jitrino::StlBitVector&):
Assertion `!inEdges.empty()' failed.
> SIGABRT in VM code.
> Stack trace:
>         1: ?? (??:-1)
>         2: abort (??:-1)
>         3: __assert_fail (??:-1)
>         4: findNodesInRegion (/export/users/evpasko/svn/3/trunk/working_vm/vm/jitrino/src/optimizer/FlowGraph.cpp:458)
>         5: inlineJSR (/export/users/evpasko/svn/3/trunk/working_vm/vm/jitrino/src/optimizer/FlowGraph.cpp:572)
>         6: inlineJSRs (/export/users/evpasko/svn/3/trunk/working_vm/vm/jitrino/src/optimizer/FlowGraph.cpp:658)
>         7: Jitrino::FlowGraph::doTranslatorCleanupPhase(Jitrino::IRManager&) (/export/users/evpasko/svn/3/trunk/working_vm/vm/jitrino/src/optimizer/FlowGraph.cpp:833)
>         8: Jitrino::TranslatorSession::postTranslatorCleanup() (/export/users/evpasko/svn/3/trunk/working_vm/vm/jitrino/src/translator/TranslatorIntfc.cpp:77)
> [snip]
> obviously, the bug is in the subroutine inlining algorithm

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message