Skip to content

[pull] master from gulrak:master#65

Open
pull[bot] wants to merge 29 commits intojnhyatt:masterfrom
gulrak:master
Open

[pull] master from gulrak:master#65
pull[bot] wants to merge 29 commits intojnhyatt:masterfrom
gulrak:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Apr 27, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull Bot added the ⤵️ pull label Apr 27, 2024
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 27, 2024

Pull Request Test Coverage Report for Build 8859155396

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 95.498%

Totals Coverage Status
Change from base Build 8495518484: 0.2%
Covered Lines: 3564
Relevant Lines: 3732

💛 - Coveralls

bbannier and others added 23 commits December 18, 2024 15:26
GNU `getcwd` can allocate a buffer if passed `NULL` for it. This is an
extension which is e.g., not recognized by clang-tidy-19's
`StdCLibraryFunctions` check[^1] which emits a diagnostic on a violated
precondition `buf != NULL`,

```
The 1st argument to 'getcwd' is NULL but should not be NULL [clang-analyzer-unix.StdCLibraryFunctions,-warnings-as-errors]
[build]  3987 |     std::unique_ptr<char, decltype(&std::free)> buffer{::getcwd(NULL, 0), std::free};
```

This patch modifies this use of `getcwd` with this extension behavior to
instead use `get_current_dir_name` which is also a GNU extension, but
does not trigger this diagnostic.

[^1]: https://clang.llvm.org/docs/analyzer/checkers.html#unix-stdclibraryfunctions-c
centos7 has reached EOL on 2024-06-30, centos8 on 2021-10-31. In
practical terms this means that their package repositories are offline
for the foreseeable future and the CI tasks making use of them might
never run again.

This patch replaces the existing CI jobs on centos7/centos8 with jobs on
rockylinux8/9. Since rockylinux is an open source variant similar to
RHEL this should provide testing with similar spirit. In contrast to
centos, rockylinux does provide very granular tagging of releases which
if used would help avoid breaking on e.g., subtle package changes in
their package repositories. I however did not use very precise tags in
the patch and instead went with broad "trains" for the 8 and 9 series;
I hope this minimizes maintenance overhead (e.g., bumping to new
releases) while still giving a good testing signal.
This resolves warnings when compiling with -wundef (and errors when
combined with -werror).
Check macros are defined before use
…-buf

Avoid GNU `getcwd` extension behavior
- read(): POSIX specifies that errno is undefined when read() return values are >= 0.
  The previous retry logic had bugs:
  When read() returns 0 (EOF), the loop condition checked errno before
  the return value. Since errno might be stale from a previous call, this could
  trigger a false retry on EOF.

- readdir(): When readdir() reaches the end of directory, it returns NULL
  without modifying errno. Setting errno=0 before the loop caused an infinite loop.
…orkaround for GCC 5-6, ensuring unified CMake configuration across all versions.
Fix EINTR handling in read() and readdir() loops
Added MSYS2 compilers to GitHub workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants