1. 18 Feb, 2022 1 commit
  2. 17 Feb, 2022 1 commit
  3. 31 Jan, 2022 2 commits
  4. 29 Jan, 2022 2 commits
  5. 28 Jan, 2022 1 commit
  6. 27 Jan, 2022 1 commit
    • Christopher Chavez's avatar
      ProcessUNIX.c: fix select(), FD_SETSIZE on macOS · 5a33629f
      Christopher Chavez authored
      On macOS (reportedly for 10.5 and later), if _DARWIN_UNLIMITED_SELECT is
      not defined, then the select() call in kwsysProcessWaitForPipe() fails
      with EINVAL when (max + 1) > 1024. And, by default, FD_SETSIZE is 1024;
      passing file descriptors not less than FD_SETSIZE to FD_CLR(), FD_SET(),
      and FD_ISSET() causes out-of-bounds accesses, at least for an fd_set
      allocated on the heap (as is the case for cp->PipeSet, allocated by
      kwsysProcess_New(); one observed effect of this is corruption of the
      "Invalid argument" error message copied from strerror(errno) into
      cp->ErrorMessage, since cp->ErrorMessage is located shortly after
      cp->PipeSet). Defining _DARWIN_UNLIMITED_SELECT and defining FD_SETSIZE
      to OPEN_MAX (10240) avoids these issues.
  7. 22 Jan, 2022 2 commits
  8. 21 Jan, 2022 2 commits
    • Clemens Wasser's avatar
      Glob: Optimize directory/symlink checks on Windows · d4c5ed92
      Clemens Wasser authored and Brad King's avatar Brad King committed
      Use data saved by `Directory` traversal to avoid repeating work.
    • Brad King's avatar
      Directory: Replace FileData with methods accepting file index · 4b552447
      Brad King authored
      The internal calls to `SystemTools::FileIs{Directory,Symlink}` added by
      commit 7573b0fd (Directory: Add Is{Directory,Symlink} to FileData,
      2022-01-11) pass only the file name, which will be interpreted relative
      to the current working directory rather than the `Directory` path.
      We need to use the absolute path instead.  Rather than trying to
      make this available in the `FileData` structure, provide access to
      the information through methods accepting the file index.
  9. 19 Jan, 2022 3 commits
  10. 18 Jan, 2022 2 commits
  11. 14 Jan, 2022 2 commits
  12. 13 Jan, 2022 1 commit
  13. 11 Jan, 2022 2 commits
  14. 10 Jan, 2022 1 commit
  15. 07 Jan, 2022 1 commit
  16. 06 Jan, 2022 1 commit
    • Jessica Clarke's avatar
      SystemInformation: Change GetRealAddress to return a size_t · ebfb5cdb
      Jessica Clarke authored
      The return value is not a real pointer, but an integer representing the
      offset of the symbol within the loaded binary/library (possibly
      including a load base). On CHERI, and thus Arm's Morello prototype,
      pointers are not just integers but are unforgeable hardware capabilities
      that contain additional metadata (including bounds and permissions) to
      provide fine-grained spatial safety. Casting a plain integer (in this
      case, a ptrdiff_t) to a void * gives a warning that we normally make
      fatal, as due to the unforgeability of capabilities it will not be a
      valid pointer, trapping on dereference. Whilst there are ways to squash
      this warning (typically by casting via (u)intptr_t), they are not
      appropriate here, since the return value does not need to be a void *,
      and are normally only needed for reusing void *-taking interfaces with a
      plain integer (e.g. pthread_create's void * argument). Thus change the
      return type to be size_t to represent that this is the non-negative
      integer offset of the address from the base address.
      Note that, other than the dummy call in the constructor that throws away
      the result, this member function is unused.
  17. 01 Nov, 2021 1 commit
  18. 29 Oct, 2021 3 commits
  19. 28 Oct, 2021 2 commits
    • Brad King's avatar
      SystemTools: Simplify FileIsExecutable on Windows · f5b3500f
      Brad King authored
      Revert commit 41700ca4 (SystemTools: Fix FileIsExecutable on Windows,
      2020-04-09).  The purpose of that change was to avoid treating the path
      `%USERPROFILE%\AppData\Local\Microsoft\WindowsApps\python.exe` as an
      executable because it might point at an application installer instead of
      a working Python.  Since commit 29f31d17 (SystemTools: Add Windows app
      exec alias support to FileExists(), 2021-10-22), the implementation
      using `FileExists` will find it anyway.  Client (e.g. CMake) will need
      another way to avoid using that python app link incorrectly.
    • Brad King's avatar
  20. 27 Oct, 2021 2 commits
  21. 25 Oct, 2021 7 commits