-
Sub-task
-
Resolution: Won't Fix
-
Medium
-
None
-
i686
-
Other
stdio.seek, which calls fseeko, uses "off_t" for argument, and
when seeking toward head of the file, passing negative off_t value
must be passed.
Currently when callling stdio.seek, "size_t" variable is passed
to the argument. On 64 bit system, the problem is hidden because
both size_t (unsigned) and off_t (signed) are 64 bit.
But on 32 bit system, as size_t is unsigned 32 bit and off_t is
signed 64 bit, when passing size_t "message_size - already_read"
(which is intended to be negative to seek toward head) is converted
to large unsigned 32 bit value, which is not intended.
The fix is to correctly cast to off_t.
The attached patch fixes the following tests failure on 2.4.1:
# 100 - eccodes_t_bufr_ecc-875 # 118 - eccodes_t_gts_get # 119 - eccodes_t_gts_ls # 120 - eccodes_t_gts_count # 121 - eccodes_t_gts_compare # 122 - eccodes_t_metar_ls # 123 - eccodes_t_metar_get # 124 - eccodes_t_metar_dump # 125 - eccodes_t_metar_compare # 162 - eccodes_t_grib_copy
- blocks
-
SUP-2408 some eccodes tests fail on i686 platform
- Resolved