lat_mem_rd:step() infinite loop
Brought to you by:
staelin
If k is 2048 or greater in step, then step will be caught in an infinite loop in the following line of code.
for (s = 32 * 1024; s <= k; s *= 2)
;
k = 0x80000000 and eventually s will equal 0x80000000. The next multiplication (shl) will set s equal to zero.
Proposed fix: prevent k from being set to 2048 or greater . There are two places this should be done. First, the CONFIG file should set MB to a value less that 2048. Second, lat_mem_rd should reset any value greater than or equal to 2048 to 2047.