青少年科创大赛作品:QTBUG-17355 QML "Bus error" caused by align in mips platform

来源:百度文库 编辑:九乡新闻网 时间:2024/05/05 19:57:40

It is a problem about align in mips platform


Description

In src/script/bridge/qscriptdeclarativeclass_p.h 75 line

"dummy[8]" will cause qml "bus error",When I modify it to "char dummy[8] _attribute_ ((aligned(8)))",it can work normally.

First I use Qt in soft-float environment,so it performance good. If I change environment to hard-float,it would "bus error",when I run qml; I trace this problem ,i find error occur in "JSValue.h" .But it is called in "QScriptDeclarative::Value::Value(QScriptEngine *eng,float value)".So I think it's a problem of align.

I think in embed environment ,it need 8 byte align for use double type.
 Comments

In QtQuick2 we've switched to V8, which doesn't have this problem.