Skip to content

Conversation

pull[bot]
Copy link

@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

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 6 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
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.

4 participants