Bug #37749 | Falcon assertion at line 36 in file SectorBuffer.cpp | ||
---|---|---|---|
Submitted: | 30 Jun 2008 19:04 | Modified: | 30 Jul 2008 13:57 |
Reporter: | Hakan Küçükyılmaz | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Falcon storage engine | Severity: | S2 (Serious) |
Version: | 6.0 bzr | OS: | Linux |
Assigned to: | Kelly Long | CPU Architecture: | Any |
Tags: | DBT2 |
[30 Jun 2008 19:04]
Hakan Küçükyılmaz
[1 Jul 2008 19:45]
Hakan Küçükyılmaz
Verified with a DBT2 -c8 -w100 on caneland, lu0009, and walldorf. I hit the assertion every time with -w100.
[2 Jul 2008 19:45]
Kelly Long
32-bit math overflow. === modified file 'storage/falcon/SectorBuffer.cpp' --- storage/falcon/SectorBuffer.cpp 2008-06-17 21:00:45 +0000 +++ storage/falcon/SectorBuffer.cpp 2008-07-02 19:45:14 +0000 @@ -39,7 +39,7 @@ void SectorBuffer::readSector() { - uint64 offset = sectorNumber * cache->pagesPerSector * cache->pageSize; + uint64 offset = (uint64)sectorNumber * (uint64)cache->pagesPerSector * (uint64)cache->pageSize; activeLength = dbb->pread(offset, SECTOR_BUFFER_SIZE, buffer); }
[2 Jul 2008 20:50]
Kevin Lewis
The patch looks good to me. Kelly explained to me that because of the overflow of 'offset' in SectorBuffer::readSector(), the buffer had a zero length. So 'activeLength' was zero. Then in SectorBuffer::readPage(Bdb* bdb), ASSERT(offset < activeLength) failed. OK to push.
[2 Jul 2008 20:55]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/48915 2727 Kelly Long 2008-07-02 fix 32-bit math overflow -- Bug #37749
[2 Jul 2008 20:58]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/48916 2727 Kelly Long 2008-07-02 fix 32-bit math overflow -- Bug #37749
[30 Jul 2008 13:57]
MC Brown
Internal testing, no changelog entry required.