2013-02-22

Bitflips

Jenkins autobuild of a Qt program failed with a strange error:
/opt/qt/4.8/include/QtGui/qpalette.h:138:18: error: unknown type name 'QBzush'; did you mean 'QBrush'?
    inline const QBzush &buttonText() const { return brush(ButtonText); }
                 ^~~~~~
                 QBrush
/opt/qt/4.8/include/QtGui/qbrush.h:76:20: note: 'QBrush' declared here
class Q_GUI_EXPORT QBrush
                   ^
The error says that the type QBzush was not found, but the name resembles QBrush. The "typo" seemed to be in Qt's header file qpalette.h, but the file was fine and the next build of the exactly same source succeeded.
There is only 1 bit difference between 'z' and 'r'. We must've experienced a bitflip. According to wikipedia these are surprisingly common on commodity hardware.
r = 114 = 1110010
z = 122 = 1111010
ECC memory is a friend. Have to figure out how to get Mac builds on a computer with ECC RAM.