-
Notifications
You must be signed in to change notification settings - Fork 48
After upgrade to 0.22: atf-check: ERROR: Caught unexpected error: vector
(sometimes)
#76
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
Comments
|
Here is a FreeBSD example: |
Oh, interesting... it's a UBSAN run, so compiler-rt is likely outputting some error message which isn't getting cleanly relayed to the consumer. |
This also has UBSAN enabled. Hmmm... I suspect there's something funky with the new release with CC: @bapt |
atf-check: ERROR: Caught unexpected error: vector
message is sometimes seen with UBSAN enabled
atf-check: ERROR: Caught unexpected error: vector
message is sometimes seen with UBSAN enabledatf-check: ERROR: Caught unexpected error: vector
message is sometimes seen with ASAN/LSAN/UBSAN enabled
In the FreeBSD example above, UBSAN is just an environment variable. The code itself is compiled without |
Hi Enji, Cheers, |
for your information it happen all the time on freebsd with or without libasan, it means the pkg testsuite is broken for weeks, now... |
this is the commit that cause the regression: dca2e69 |
I figured it was likely that issue sigh... |
My gut feeling is that most of the issues I've addressed on https://github.com/ngie-eign/atf/tree/fix-scan-build-issues will also handle this. I just haven't fixed the issue with |
Hi Enji, scanned through your work. I really like thay you are addressing the memory leaks. Looking forward to get that merged and released. |
@bapt : do you have a simple repro you can provide to identify the issue seen here? |
pkg, ./configure ; make check you will see 3 failures all due to this bug |
To clarify:
? |
atf-check: ERROR: Caught unexpected error: vector
message is sometimes seen with ASAN/LSAN/UBSAN enabledatf-check: ERROR: Caught unexpected error: vector
(sometimes)
Ok, yeah... I see it. |
The previous logic used 2 separate calls to `atf::fs::path::str()` when constructing a `std::vector<char>` to pass to `mkstemp(..)`. This in turn caused grief with how data copying is done in atf-c(3), etc, as the prior code computed the length of the path of an internal buffer in `atf_dynstr` structs. Moreover, the code was manually appending a nul char, which was unnecessary when making the valid assumption that `std::string` is a nul-terminated string. The new code convert the path to an `std::string` once, includes the existing nul char in the buffer, then passes it to mkstemp(3) instead. The code works properly now. Closes: freebsd#76 Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
Found the commit that addressed the issue. The problem found by the freebsd/pkg check tests is fixed on HEAD. |
The previous logic used 2 separate calls to `atf::fs::path::str()` when constructing a `std::vector<char>` to pass to `mkstemp(..)`. This in turn caused grief with how data copying is done in atf-c(3), etc, as the prior code computed the length of the path of an internal buffer in `atf_dynstr` structs. Moreover, the code was manually appending a nul char, which was unnecessary when making the valid assumption that `std::string` is a nul-terminated string. The new code convert the path to an `std::string` once, includes the existing nul char in the buffer, then passes it to mkstemp(3) instead. The code works properly now. Closes: freebsd#76 Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
This fixes dev-util/pkgconf's tests with atf-0.22. Bug: freebsd/atf#76 Signed-off-by: Sam James <sam@gentoo.org>
The previous logic used 2 separate calls to `atf::fs::path::str()` when constructing a `std::vector<char>` to pass to `mkstemp(..)`. This in turn caused grief with how data copying is done in atf-c(3), etc, as the prior code computed the length of the path of an internal buffer in `atf_dynstr` structs. Moreover, the code was manually appending a nul char, which was unnecessary when making the valid assumption that `std::string` is a nul-terminated string. The new code convert the path to an `std::string` once, includes the existing nul char in the buffer, then passes it to mkstemp(3) instead. The code works properly now. Closes: #76 Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
Hi,
after uprading to 0.22 I have spurious (random)
test errors in the
kyua
logs.Seen on both GitHub MacOS runners as well as on SourceHut FreeBSD runners.
E.g.
https://github.com/kevemueller/pkg/actions/runs/12120407123/job/33789027959
How can I get around these?
The text was updated successfully, but these errors were encountered: