mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-10 06:55:15 +00:00
Both the demo and the test asserted that each running instance of a module gets its own copy of a library named in DT_NEEDED: two instances adding their own seed each saw a total of seed*3. That was true of the loader that walked DT_NEEDED itself. The loader now hands the work to dlopen(), which returns the object already in the module registry rather than loading a second copy of it, so there is one library and one set of its globals, shared by every module that names it. The module's own data stays private per instance, because exec() loads the module afresh each time. What an instance can still assert on its own is that every add it made landed in the library, so that is what it checks; the totals interleave and the final one counts both. The test additionally checks the consequences: the library is pinned once rather than once per instance, and its destructor runs once, at the last close, holding what both instances built up. USER_FAIL_PRIVATE becomes USER_FAIL_SHARED rather than gaining a companion. The bit is a private protocol between cxxuser.cpp, which sets it, and testing/fs/xipfs, which reads it; nothing else names it, and the property it used to report no longer exists. Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com> |
||
|---|---|---|
| .. | ||
| arch | ||
| cmocka | ||
| crypto | ||
| cxx | ||
| cxx-oot-build | ||
| drivers | ||
| enet | ||
| fff | ||
| fs | ||
| libc | ||
| ltp | ||
| mm | ||
| nettest | ||
| nuts | ||
| ostest | ||
| sched | ||
| sig_sp_test | ||
| testsuites | ||
| unity | ||
| .gitignore | ||
| CMakeLists.txt | ||
| Make.defs | ||
| Makefile | ||