-
Notifications
You must be signed in to change notification settings - Fork 26
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
lib-test test failure #38
Comments
Hmm. Interesting. That test is passing for me, but it is sensitive to things like memory placement. The failure line (static.c:172) is testing for a NULL info pointer from dl_iterate_phdr, which should never happen. However, sometimes the optimizer merges abort() paths, so the line numbers are not reliable. Can you do
and generate another backtrace? That should rebuild with -O0. For background: 'lib-test' exists for running unit tests that get baked into a special liballocs-test.so binary. The idea is that the test program dlopens that binary, and the unit tests are run in the constructor logic. This has always seemed ugly to me, but I don't know good ways of running unit tests that would work for liballocs. |
Thanks for the context and tips! Curiously, the test passes when rebuilding with If I change the following in - FAST_EXTRA_CFLAGS := -O3 -DNDEBUG -flto -ffat-lto-objects
+ FAST_EXTRA_CFLAGS := -O3 -DNDEBUG This is with |
…ilitate lib-test Our approach to quasi-unit testing (really per-file integration tests) involves running self-tests as constructors in a dlopenable build of liballocs. That has been broken for a while, but this 'works for me'... hoping this closes GitHub issue #38, CI pending....
This is fixed as of 0f044d6... following several changes to how this test works, it is now re-enabled. It's arguably cheating a bit, because in the new way of things, this particular test isn't run against an optimised build of the main liballocs code... it uses a special build which is always |
On at least Ubuntu 18.04.2, the
lib-test
test segfaults, and gdb gives the following stack:The text was updated successfully, but these errors were encountered: