Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.4.0 Beta1
-
5e4a1738b0 (qt/qtdeclarative/dev) 5e4a1738b0 (qt/tqtc-qtdeclarative/dev) cbfd4fdecb (qt/qtdeclarative/6.4) cbfd4fdecb (qt/tqtc-qtdeclarative/6.4)
Description
Consider:
import QML QtObject { function test() : int { var i = 0, x; while (i == 0) { x = 1; i = 1; } if (i == 1) return x; return 0 } }
This crashes the compiler because the register access on x in the "if" block is not correctly propagated. The type propagator still handles it via a second pass, but the basic blocks pass does not understand that x is indirectly propagated "backwards" through the "while". Turning off the life time analysis in QQmlJSBasicBlocks::adjustTypes() fixes the problem, but it's yet unclear at what cost.
Attachments
Issue Links
- blocks
-
QTBUG-104462 qmlsc miscompiles JavaScript functions with arguments
- Closed
For Gerrit Dashboard: QTBUG-104665 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
419656,4 | QmlCompiler: Fix register propagation in basic blocks pass | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
420364,5 | QmlCompiler: Fix register propagation in basic blocks pass | 6.4 | qt/qtdeclarative | Status: MERGED | +2 | 0 |