googletest
googletest copied to clipboard
[Bug]: Corrupt test name in test log and xml output
Describe the issue
Output of the test name can some times get corrupted (producing invalid utf-8 characters in the xml test output):
[ RUN ] SmokeTest.SSSSÊ
[ OK ] SmokeTest.SSSSÊ (0 ms)
Looks like uninitialized memory or some similar issue.
Steps to reproduce the problem
With this single empty test.
TEST(SmokeTest, SSSS)
{
}
With a longer test name SSSSSSSSSSSSSSSSSSSSSS there is no corruption of output data.
It is not consistent, and many other similar test work just fine.
What version of GoogleTest are you using?
This issue appeared when upgrading to 1.13. We are not seeing the same issue with 1.10 (and the same test suites).
What operating system and version are you using?
This works on a variety of linux builds, osx builds, but fails on Windows Server 20h2
What compiler and version are you using?
VisualStudio VC.14.34.17.4.x86.x64
What build system are you using?
bazel
Additional context
We have many thousands of tests that work fine with 1.10 on windows. This only happened when we upgraded to 1.13 and only in one of the test suites TEST or TEST_F with a test fixture doesn't make any difference.
I suspect this will be hard to find unless you see some uninitialized buffer by inspection. But perhaps some one has a better repro and finds this issue.
Could this issue be related to the fix for GitHub issue #3997? The fix was a workaround for initializing the TestInfo name. It would be interesting to see if reverting the changes fixes this problem. I don't see any changes upstream that could cause this issue, but I might have missed something.
Hi, I'm unfortunately struggling to reproduce this, and I'm not finding adequate information to track this down or reproduce your environment exactly. I recall #3997 was quite time-confusing to reproduce and track down, so this may be similar here. For now, I will close this issue for now as unreproducible, but if you're still running into this issue and would like it resolved, I'd like to ask that you help us by performing the following:
- Let us know the precise build flags/configuration files/command lines/etc. you are using at each step.
- Revert/alter the fix in #3997 and let us know whether that affects anything.
- Obtain the most recent GoogleTest commit, let us know the SHA you obtained, and let us know whether it was broken or not.
- Find the most-recently-broken commit (e.g., via
git bisect) and let us know its SHA. - Obtain the most recent MSVC version and let us know whether this is broken with that version or not.
If/when you are able to all of the above, please feel free to reopen the issue and I can try to reinvestigate. Thanks!