Open emmenlau opened 4 years ago
Can you please provide the full reproduction? We need to know exactly what you did. Maybe simple a GitHub repo that I can pull and run?
Thanks @derekmauro for your quick action.
I wanted to provide this anyways as a PR for the community, in the hope that it will be useful. There was a minor typing error before, but now https://github.com/google/googletest/pull/3072 should be ready. Can you please take a look?
@derekmauro does the PR work for you to reproduce the issue?
I'm trying to build against abseil and found a new release 20200923.1 from two weeks ago. I build using cmake, by adding the definition
GTEST_HAS_ABSL
and linking against the required absl libraries. The build works fine and I did not see any noteworthy warnings.However when running google test, I get a
std::bad_alloc
on everyASSERT
. I traced the problem in gtest to https://github.com/google/googletest/blob/master/googletest/src/gtest.cc#L4834, and from there into absl to https://github.com/abseil/abseil-cpp/blob/4b915e70929ca2d6152240facc83d3d38c5d5f28/absl/strings/str_cat.cc#L202If I replace
absl::StrAppend(&result, kElidedFramesMarker, "\n");
with a simpleresult += std::string(kElidedFramesMarker) + "\n";
everything works as expected.I'm a bit lost there as to what is going wrong, help would be appreciated.
I tried with gtest 1.10.0 and latest master, both show the same behavior.
My environment is Ubuntu 20.04 with gcc9, x86_64. I've set the c++ standard to c++17 in absl.