[all-commits] [llvm/llvm-project] c4ef31: Fix calls to (p)read on macOS when size > INT32_MAX

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Mon Oct 26 20:52:02 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c4ef3115b4296321090ce33987d6fdf7fa337fc1
      https://github.com/llvm/llvm-project/commit/c4ef3115b4296321090ce33987d6fdf7fa337fc1
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M llvm/lib/Support/Unix/Path.inc

  Log Message:
  -----------
  Fix calls to (p)read on macOS when size > INT32_MAX

On macOS, the read and pread syscalls return EINVAL when the number of
bytes to read exceeds INT32_MAX:

https://github.com/apple/darwin-xnu/blob/a449c6a3b8014d9406c2ddbdc81795da24aa7443/bsd/kern/sys_generic.c#L355

rdar://68751407

Differential revision: https://reviews.llvm.org/D90201




More information about the All-commits mailing list