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
LLDB prints incorrect size of libstdc++ STL containers #15673
Comments
Is this compiler dependent, library dependent, or both? If you could post the combinations of compiler and C++ library you tested and what works/fails, that would make this bug a lot clearer. |
It looks like the data formatter bug is probably not compiler related -- I am seeing some related tests fail with Clang (and libstdc++). Specifically, the following two tests reproduce the test failure due to incorrect size: TestDataFormatterStdMap |
The test variant 'data_formatter_commands_after_steps' exposes a loss of every second "next" command. This variant sets a breakpoint before a list is populated, and steps 4 times to populate the list with 4 items. When this script is run using dotest, dosep or manually at the lldb command prompt, 2 "next" commands are required to populate a single list item. Note that this does not occur if the std::list contains integers rather than elements of type std::string. Note that a single line of code constructs an std::string and adds an element to the list. Also, this specific failure cannot be reproduced with clang r182733, whereas it reproduces with gcc 4.6.3 (Ubuntu 12.04) and 4.6.2 (LLDB buildbot) and icc 13.1. |
Author: enrico URL: http://llvm.org/viewvc/llvm-project?rev=184265&view=rev Hardening the libstdc++ std::map test case against line table changes Let me know if this fixes the bug. |
I re-ran these tests, and am still seeing some failures. When running with clang, I got the following failures: ======================================================================
|
I should mention in the above test run, I was validating against LLDB built on Linux from SVN revision 185951. |
With which standard C++ library implementation? Kind of important for this issue! |
Right, here's additional information: TestTypeCompletion.py fails with gcc-4.6/libstdc++ 4.6 (but passes with gcc-4.7/libstdc++-4.7) TestDataFormatterStdIterator and TestDataFormatterStdVBool fail with gcc-4.6/libstdc++-4.6 and gcc-4.7/libstdc++-4.7 (but pass clang/libstdc++-4.7) TestDataFormatterStdMap crashes LLDB when built against gcc-4.6 and gcc-4.7 (see llvm.org/pr15036) and fails when built with clang/libstdc++-4.7. TestDataFormatterStdVector fails with gcc-4.6/libstdc++-4.6, gcc-4.7/libstdc++-4.7 and clang/libstdc++-4.7. TestDataFormatterStdList fails with gcc-4.6/libstdc++-4.6 but passes when built with clang or gcc-4.7 with libstdc++-4.7. |
These tests are XPASS on FreeBSD with clang and and libstdc++ 4.2.1 or libc++. |
The tests pass now. |
Extended Description
In the TestDataFormatterStdVBool, instead of printing the correct size (49) lldb prints -1 for the size of the std::vector container (libstdc++).
To reproduce, run:
python dotest.py functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool -C gcc
The text was updated successfully, but these errors were encountered: