Actions
Bug #11262
closedstat() calls in Wt may cause EOVERFLOW on 32 bit builds
Start date:
01/18/2023
Due date:
% Done:
100%
Estimated time:
Description
A user using a 32 bit build of Wt reported via email that it is possible to get the following error (EOVERFLOW
):
stat: Value too large for defined data type
Document root (".") not valid.
This happened when the document root was located on a network share. Perhaps this network share was using inode numbers that were too large?
This is what the stat(2)
man page has to say about it:
EOVERFLOW
pathname or fd refers to a file whose size, inode number, or number of blocks cannot be represented in, respectively, the types off_t, ino_t, or blkcnt_t. This error can occur when, for exam‐
ple, an application compiled on a 32-bit platform without -D_FILE_OFFSET_BITS=64 calls stat() on a file whose size exceeds (1<<31)-1 bytes.
There are a few ways we can fix this. We can either make sure -D_FILE_OFFSET_BITS=64
is defined, or we can go less low level and use boost::filesystem
or std::filesystem
's status
function. I propose we go for the latter option and replace our own uses of the stat()
function with the appropriate use of boost::filesystem
instead.
Files
Updated by Roel Standaert almost 2 years ago
- Status changed from New to InProgress
- Assignee set to Roel Standaert
Updated by Roel Standaert almost 2 years ago
- Target version changed from 4.10.0 to 4.9.2
Updated by Roel Standaert almost 2 years ago
- Status changed from InProgress to Review
- Assignee deleted (
Roel Standaert)
Updated by Roel Standaert almost 2 years ago
- File 0001-WT-11262-replace-uses-of-stat-with-boost-filesystem.patch 0001-WT-11262-replace-uses-of-stat-with-boost-filesystem.patch added
Attaching a patch that simply replaces our uses of stat()
with boost::filesystem
.
Updated by Roel Standaert almost 2 years ago
- Status changed from Review to Implemented @Emweb
- Assignee changed from Marnik Roosen to Roel Standaert
Updated by Roel Standaert almost 2 years ago
- Status changed from Implemented @Emweb to Resolved
- % Done changed from 0 to 100
Updated by Roel Standaert over 1 year ago
- Status changed from Resolved to Closed
Actions