Menu

#5 lat_mem_rd:step() infinite loop

open
nobody
None
5
2007-08-08
2007-08-08
rmlane
No

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.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB