Page MenuHomePhabricator

Fixed overflow in GetPerformanceCounter()
ClosedPublic

Authored by CCulianu on Aug 15 2017, 01:54.

Details

Summary

I ran UBSAN on the tests and this was one of the easier fixes. Bitcoin compiles as a 32-bit app and as such this usage ends up with an overflow. Note that this bug isn't super-critical as the GetPerformanceCounter() function is only used to seed random number generators, but it still is a bug nonetheless.

Test Plan

make check and rpc-tests.py

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Modified to be minimally required expression syntax to have all types auto-promoted to int64

This revision is now accepted and ready to land.Aug 15 2017, 21:17
This revision was automatically updated to reflect the committed changes.