From fe8276e812c5fdc690715d7e36a6b6d70cba7d33 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Wed, 24 Nov 2010 17:00:20 +1000 Subject: Prevent compilers optimizing eval timebomb code out of existence. The variable that holds the eval license key is a placeholder that is patched during package installation. Unfortunately, for a non-final package build, the placeholder is filled with nulls at compile-time and a clever compiler will optimize away most of the eval timebomb code due to a check in the eval code for the first character of the license key being null. This commit makes the variable that holds the license key volatile, to convince compilers that they cannot make assumptions about the contents of the variable when optimizing. Task-number: QT-3848 Acked-by: Thiago Macieira --- configure | 2 +- src/corelib/kernel/qtcore_eval.cpp | 4 ++-- tools/configure/configureapp.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 5aab180..059aa1a 100755 --- a/configure +++ b/configure @@ -4520,7 +4520,7 @@ if [ -n "$EVALKEY" ]; then rm -f "$outpath/src/corelib/global/qconfig_eval.cpp" cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <