Closed Bug 218391 Opened 21 years ago Closed 15 years ago

Assertions if object > 64MB

Categories

(Core :: Networking: Cache, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 443067

People

(Reporter: tenthumbs, Unassigned)

References

Details

(Keywords: assertion)

If you try to load a text file > 64MB you start to get many pairs of assertions once the received portion exceeds 64MB. ###!!! ASSERTION: disk cache size negative?: 'mHeader.mDataSize >= 0', file nsDiskCacheMap.h, line 469 Break: at file nsDiskCacheMap.h, line 469 ^G###!!! ASSERTION: disk cache size negative?: 'mHeader.mDataSize >= 0', file nsDiskCacheMap.h, line 460 Break: at file nsDiskCacheMap.h, line 460 The relevant code is actually in nsDiskCacheStreams.cpp at nsDiskCacheStreamIO::UpdateFileSize. 577 // update cache size totals 578 nsDiskCacheMap * cacheMap = mDevice->CacheMap(); 579 cacheMap->DecrementTotalSize(oldSizeK * 1024); 580 cacheMap->IncrementTotalSize(newSizeK * 1024); Typical values that cause assertions are: (gdb) p/x oldSizeK $9 = 0x21000 (gdb) p oldSizeK $10 = 135168 (gdb) p/x newSizeK $11 = 0x4022000 (gdb) p newSizeK $12 = 67248128 (gdb) p/x newSizeK*1024 $13 = 0x8800000 Note that newSizeK*1024 is actually 0x1008800000 which overflows 32 bits. I know that 64MB is magic amd mozilla doesn't store sizes larger than this but it shouldn't try to update anything since the numbers are useless, particularly when you have arithmetic overflow which could cause all sorts of problems.
Blocks: 160540
Blocks: 230125
*** Bug 194501 has been marked as a duplicate of this bug. ***
Assignee: darin → nobody
Probably fixed by bug 443067?
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.