-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
5 tests fail on FreeBSD #189
Comments
Tough problems, huh. The PluginManager error is because I assume the tests get run under root, and the root's home directory isn't The Pair errors aren't really important, it's just comparing to the The GrowableArray failure was an interesting one. I think I understand why it happened, and hopefully the mitigation in b4e6678 makes it no longer happen. Let me know if it does. The diff --git a/src/Corrade/Utility/Path.cpp b/src/Corrade/Utility/Path.cpp
index 5bf13da77..76295b53f 100644
--- a/src/Corrade/Utility/Path.cpp
+++ b/src/Corrade/Utility/Path.cpp
@@ -603,13 +603,14 @@ Containers::Optional<Containers::String> executableLocation() {
/* FreeBSD */
#elif defined(__FreeBSD__)
- /* Get path size, it's returned excluding the null terminator */
+ /* Get path size. It's returned including the null terminator, thus we have
+ to make the string one byte shorter to not have a second \0 there. */
std::size_t size;
constexpr int mib[4]{CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1};
sysctl(mib, 4, nullptr, &size, nullptr, 0);
/* Allocate a string of proper size and retreive the path into it */
- Containers::String path{NoInit, size};
+ Containers::String path{NoInit, size - 1};
sysctl(mib, 4, path.data(), &size, nullptr, 0);
return path;
|
Here is the log.
clang-18
FreeBSD 14.1
The text was updated successfully, but these errors were encountered: