pcre2grep: Support large (64-bit) file sizes · Issue #1024 · PCRE2Project/pcre2 · GitHub
Skip to content

pcre2grep: Support large (64-bit) file sizes #1024

Open

Description

@NWilson

pcre2grep uses fseek/ftell to handle file offsets.

This should switch to fseeko/ftello on POSIX systems (_fseeki64 on Windows). Even on 32-bit CPUs, files on disk can be larger than 4GiB, so size_t arithmetic is not wide enough.

There is some Autoconf and CMake mess to navigate around this (a wide variety of OS-specific defines to make off_t use its 64-bit definition).

Variables used to track buffer positions can remain as size_t, however, some narrowing casts to int could be removed.

Activity

  1. added this to the Future milestone on Oct 19, 2026
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

    untidinessNot exactly a bug, but could do better

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions