qt5base-lts/tests/auto/corelib/tools/qregexp
Giuseppe D'Angelo 281771ee20 QRegExp: fix usage of uninitialized values
A (probable) typo was causing the code dealing with anchors
to use uninitialized values. This used to work by chance, but was
indeed detected by Valgrind f.i. when running tst_qregexp --
the indexIn test on anc11 data reported:

    ==3015== Conditional jump or move depends on uninitialised value(s)
    ==3015==    at 0x514B4EA: PeppeQt::QRegExpMatchState::testAnchor(int, int, int const*) (qregexp.cpp:1813)
    [...]
    ==3015==  Uninitialised value was created by a stack allocation
    ==3015==    at 0x514B3EB: PeppeQt::QRegExpMatchState::testAnchor(int, int, int const*) (qregexp.cpp:1803)

Fixing the code also makes the aforementioned test to succeed.

Change-Id: If7b3e518c1bbfcf12573d2637c33ef2eca27c4d5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-05-19 01:45:04 +02:00
..
.gitignore Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
qregexp.pro Cleanup corelib autotests 2011-11-11 02:45:05 +01:00
tst_qregexp.cpp QRegExp: fix usage of uninitialized values 2012-05-19 01:45:04 +02:00