Created attachment 1402107 [details] fc28-qt-json source Description of problem: Looks like there is a regression from qt-4.8.7-34.fc28.x86_64 to qt-4.8.7-36.fc28.x86_64 that breaks QtScriptEngine ability to parse/stringify JSON integer numbers. Version-Release number of selected component (if applicable): qt-4.8.7-36.fc28.x86_64 How reproducible: Attached is a simple test program that shows the bad behavior Steps to Reproduce: 1. tar xJvf fc28-qt-json.txz 2. cd fc28-qt-json 3. qmake-qt4 4. make 5. ./fc28-qt-json Actual results: parser : "function parse_json(string) { return JSON.parse(string); }" serializer: "function serialize_json(object) { return JSON.stringify(object); }" ----- "int" (json -> qvariant -> json) ----- json : "5" qvariant: QVariant(int, 5) json : "5" ----- "int" (qvariant -> json -> qvariant) ----- qvariant: QVariant(int, 5) json : "5" qvariant: QVariant(int, 5) ----- "real" (json -> qvariant -> json) ----- json : "1.23" qvariant: QVariant(double, 1.23) json : "1.23" ----- "real" (qvariant -> json -> qvariant) ----- qvariant: QVariant(double, 1.23) json : "1.23" qvariant: QVariant(double, 1.23) ----- "string" (json -> qvariant -> json) ----- json : ""hello world"" qvariant: QVariant(QString, "hello world") json : ""hello world"" ----- "string" (qvariant -> json -> qvariant) ----- qvariant: QVariant(QString, "hello world") json : ""hello world"" qvariant: QVariant(QString, "hello world") ----- "list" (json -> qvariant -> json) ----- json : "[5, 1.23, "hello world"]" qvariant: QVariant(QVariantList, (QVariant(int, 5) , QVariant(double, 1.23) , QVariant(QString, "hello world") ) ) json : "[5,1.23,"hello world"]" ----- "object" (qvariant -> json -> qvariant) ----- qvariant: QVariant(QVariantList, (QVariant(int, 5) , QVariant(double, 1.23) , QVariant(QString, "hello world") ) ) json : "[5,1.23,"hello world"]" qvariant: QVariant(QVariantList, (QVariant(int, 5) , QVariant(double, 1.23) , QVariant(QString, "hello world") ) ) ----- "map" (json -> qvariant -> json) ----- json : "{"a": 5, "b": 1.23, "c": "hello world"}" qvariant: QVariant(QVariantMap, QMap(("a", QVariant(int, 5) ) ( "b" , QVariant(double, 1.23) ) ( "c" , QVariant(QString, "hello world") ) ) ) json : "{"a":5,"b":1.23,"c":"hello world"}" ----- "object" (qvariant -> json -> qvariant) ----- qvariant: QVariant(QVariantMap, QMap(("a", QVariant(int, 5) ) ( "b" , QVariant(double, 1.23) ) ( "c" , QVariant(QString, "hello world") ) ) ) json : "{"a":5,"b":1.23,"c":"hello world"}" qvariant: QVariant(QVariantMap, QMap(("a", QVariant(int, 5) ) ( "b" , QVariant(double, 1.23) ) ( "c" , QVariant(QString, "hello world") ) ) ) Expected results: Additional info:
Created attachment 1402109 [details] Term log showing difference in behavior between qt-4.8.7-34 and qt-4.8.7-36
I mistakenly submitted the bug before I was done creating the description. The "Actual Results" shown above are actually the expected results (i.e. what I see when running with qt-4.8.7-34 installed). Here is a snippet of what the output looks like when running with qt-4.8.7-36. The attached term log shows the full output. ----- "int" (json -> qvariant -> json) ----- json : "5" qvariant: QVariant(int, 0) json : "0" ----- "int" (qvariant -> json -> qvariant) ----- qvariant: QVariant(int, 5) json : "0" qvariant: QVariant(int, 0)
This is likely due to something in build environment, gcc compiler the most obvious candidate (qt4's source code hasn't changed).
Rex, the one relevant change between -34 and -36 is your change to the LDFLAGS. But it could also simply be a GCC regression, indeed.
Tried lots of things, mostly playing with compiler flags, and in the end, the only thing that I've found to work so far is dropping -O2 to -O1 qt5-qtscript: %changelog * Mon Mar 05 2018 Rex Dieter <rdieter> - 5.10.1-3 - support %%bootstrap, %%check: add autotests - build with -O1 to workaround s
confirmed autotests (most!) pass now, calculator example works, as well as linked bug for plasmashell
Maybe file a GCC bug about this? Seems v. likely to be a GCC 8 bug, to me?
*** Bug 1551246 has been marked as a duplicate of this bug. ***
Yeah, I'll re-open this to track it formally (hopefully so we can eventually drop the workaround in place)
This message is a reminder that Fedora 28 is nearing its end of life. On 2019-May-28 Fedora will stop maintaining and issuing updates for Fedora 28. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '28'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 28 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Do you know the status of this, Rex?
Fail on my part, didn't follow-through doing much beyond re-opening this bug. I'll go verify if it's still an issue on f30 (or not).
Confirmed no longer an issue with Qt 5.12.1 as shipped on f30. Now to try to figure out what fixed it (code changes or compiler or other)
The bug was originally reported against Qt 4 (qt-4.8.7-36.fc28.x86_64) though.
I'm testing both
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.