The bug had appeared here: https://github.com/bitcoin/bitcoin/commit/bfc6070342b9f43bcf125526e6a3c8ed34e29a71
We changed WIDTH (new WIDTH = old WIDTH * 4) but we didn't change the usage of WIDTH.
I found the bug after launch unit tests in Debug Mode.(the bug appears if tests are compiled in Debug Mode, if tests are compiled in Release Mode the bug doesn't appear)
Running 148 test cases...
unknown location(0): fatal error in "basics": (0) : Run-Time Check Failure [#2](/bitcoin-bitcoin/2/) - Stack around the variable 'rv' was corrupted.
c:\myprojects\bitcoin\src\test\uint256_tests.cpp(119): last checkpoint
*** 1 failure detected in test suite "Bitcoin Test Suite"