read access violation when running test in virtual studio 2015
Hi wahern,
Exception thrown: read access violation. to->pending was 0x2404943C4E0.
After debugging, I found at line 350 wheel = timeout_wheel(rem); in file timeout.c wheel is 9, which is is the reason why write access violation
However, test runs pretty well in ubuntu 16.04
Regards
After bebugging, I found the reason
at line 196 in file bitops.c __inline int clz64(uint64_t val) { unsigned long zeros = 0; _BitScanReverse64(&zeros, val); return (int)zeros; }
_BitScanReverse64 is actually fls.
modify like this can fix it static __inline int clz64(uint64_t val) { DWORD zeros = 0; if (_BitScanReverse64(&zeros, val)) { return 63 - zeros; } else { return 64; } }