I reproduced the bug with a help of Grzegorz's point for 64-bit box. So, patch is attached and I'm going to commit it
-- Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru WWW: http://www.sigaev.ru/