Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.2.0
-
Ubuntu 20.04 LTS
clang 10.0.0
-
0b10b83dad91b44559b9f4ddcf9d8bed5544de93 (qt/qtdeclarative/dev) b140d12fca7228e6234c2acd7d3c1a17d0cb850f (qt/qtdeclarative/6.1)
Description
- Configure Qt with "-sanitize undefined".
- Build Qt.
- Build the attached project using this build of Qt:
#include <QCoreApplication> #include <QJSEngine> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QJSEngine().evaluate("1"); return 0; }
- Run the resulting program.
You will see output like:/home/qtrob/dev/src/qt-dev-base_declarative_svg-05.20/qtdeclarative/src/qml/jsruntime/qv4stackframe_p.h:236:31: runtime error: null pointer passed as argument 2, which is declared to never be null /usr/include/string.h:44:28: note: nonnull attribute specified here SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/qtrob/dev/src/qt-dev-base_declarative_svg-05.20/qtdeclarative/src/qml/jsruntime/qv4stackframe_p.h:236:31 in