mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
fail faster on bad mmap data
This commit is contained in:
parent
34ce721624
commit
16b07128f3
@ -53,6 +53,9 @@ namespace mongo {
|
||||
// length may be updated by callee.
|
||||
theFileAllocator().allocateAsap( filename, length );
|
||||
len = length;
|
||||
|
||||
massert( "mmap() can't map area of size 0" , length > 0 );
|
||||
|
||||
|
||||
fd = open(filename, O_RDWR | O_NOATIME);
|
||||
if ( fd <= 0 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user