stat() calls in Wt may cause EOVERFLOW on 32 bit builds
A user using a 32 bit build of Wt reported via email that it is possible to get the following error (
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
status function. I propose we go for the latter option and replace our own uses of the
stat() function with the appropriate use of
Updated by Roel Standaert 5 months 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
Updated by Marnik Roosen 5 months ago
- Assignee set to Marnik Roosen
Updated by Roel Standaert about 2 months ago
- Status changed from Resolved to Closed