diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-11-24 20:49:32 +0100 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-12-03 13:51:32 +0100 |
commit | df8fbcf382b086e96082a8eb3622c60273e94c4d (patch) | |
tree | b76364fc052a0bd1535e995ba07496934fc8a359 /tests/auto/qstringbuilder2/tst_qstringbuilder2.cpp | |
parent | 9a161b6700f39756bda0089e639cb92f39b70402 (diff) |
Avoid signed overflow in moc
moc's preprocessor needs to implement certain math operation to
correctly handle #if conditions. Unfortunately, its implementation is
not overflow safe. However, those are rare enough in practice that we
in general do not need to care about them.
This patch adds a workaround for one case where UBSAN run into an
overflow related issue.
A complete fix would require to make moc spec compliant (do math with
std::max_(u)int_t operands; always wrap on overflow) in all operations.
Pick-to: 6.0 5.15
Fixes: QTBUG-88825
Change-Id: Ic4d2cb097db2fa2f9d4681bbaab3068eaa2745aa
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/qstringbuilder2/tst_qstringbuilder2.cpp')
0 files changed, 0 insertions, 0 deletions