Comments (3)
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
cd ~/Projects/liballocs && make -C src clean && make DEBUG=1
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.
from liballocs.
Thanks for the context and tips!
Curiously, the test passes when rebuilding with DEBUG=1
. Looking a bit further, it appears related to LTO:
If I change the following in src/Makefile
, then the optimised build allows the test to pass:
- FAST_EXTRA_CFLAGS := -O3 -DNDEBUG -flto -ffat-lto-objects
+ FAST_EXTRA_CFLAGS := -O3 -DNDEBUG
This is with gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
.
from liballocs.
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 -O0 -DDEBUG -DTEST
. So I can't be sure whether there is any LTO issue. But enough has changed that that would morally be a different issue. LTO of liballocs will get more testing via libcrunch, which I will get running in CI soon-ish.
from liballocs.
Related Issues (20)
- Uniqtypes should integrate with libdivide
- liballocs could usefully track reachability
- Uniqtype relationships don't capture 'which alias?', but might HOT 2
- make_precise should instead be allocator-level operations HOT 14
- Generated uniqtype names for anonymous structs/unions are not unique enough HOT 2
- Uniqtype name-mangling function is not injective HOT 2
- Dummyweaks library should go away HOT 9
- allocscc gobbles useful warnings HOT 2
- Lifetime policy support is temporarily broken
- generic_malloc can't always resolve interior pointers
- Nix build support could be very useful
- Internal documentation is lacking HOT 19
- Incorrect calculation of bit index in bitmap_delete? HOT 2
- sizeofness analysis isn't sufficiently general HOT 3
- Split private-malloc into O(nbigallocs) and O(mem) cases HOT 1
- allocscompilerwrapper.py puts defsyms too late when wrapping in-exe malloc HOT 3
- Want a homogeneous (bitmap-only) heap index
- Temporal safety feature: mirroring mmaps HOT 4
- allocscompilerwrapper.py would be better as one or more linker plugins HOT 1
- Make failure HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from liballocs.