-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
absl/strings:string_view_test Split.WorksWithLargeStrings may fail with std::bad_alloc constructing test string #54
Comments
Thanks for bringing this up. I'm not sure what to do about this since I don't think there's a number that's big enough to make the test useful and small enough that it won't cause an exception on some system. The right answer may just be to disable the test. Let me think about this for a bit. |
Is it the string constructor crashing: Or is it the push_back call: |
String constructor. |
What is the output of "ulimit -a" ? |
@mbxx: Any update on this issue? |
@jorgbrown submitted a change that is now in the public release to cut the overall amount of memory used by the test by a factor of 3. The trouble is, it eliminates the extra memory allocation done by the aforementioned push_back call, not the memory allocation cone by the constructor. So I suspect this won't fix the problem for @vsrinivas. @vsrinivas, by any chance would you mind grabbing the latest release to see if it fixes the issue for you? |
Closing this issue since the overall memory consumption was dramatically reduced. @vsrinivas, please feel free to reopen this if you're still having a problem. The next step would be disabling the test |
[ RUN ] Split.WorksWithLargeStrings
unknown file: Failure
C++ exception with description "std::bad_alloc" thrown in the test body.
[ FAILED ] Split.WorksWithLargeStrings (1397 ms)
Split.WorksWithLargeStrings attempts to create a 2**31 character std::string; this may throw an exception at construction time if the allocation is too large for the platform. (An Ubuntu 16.04 host with 3.75 GiB of RAM, using libstdc++, was insufficient).
Not sure that there's a better way to test this arc, just raising the issue.
The text was updated successfully, but these errors were encountered: