Skip to content

AP_Filesystem: lseek limits the max filesize to ~2Gbyte, limits terrain_spacing to 5 meters #26779

Open
@EosBandi

Description

Bug report

Apparently the SD card filesystem (nor other filesystems) cannot handle files larger than 2Gbyte. In theory the exFAT filesystem on the SD card can handle larger files, but the lseek function in AP_Filesystem limits the offset to an int32_t. It is causing issues with terrain .dat files larger than 2GByte, the offset calculation simply overflows and get totally wrong blocks from the file or writing block at random positions, corrupting the .dat file.

Version
4.6.0-dev and all previous versions

Platform
[ X] All
[ ] AntennaTracker
[ ] Copter
[ ] Plane
[ ] Rover
[ ] Submarine

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions