ucpu / cage Goto Github PK
View Code? Open in Web Editor NEWGame development framework / engine designed for programmers, focusing at ease of use.
License: MIT License
Game development framework / engine designed for programmers, focusing at ease of use.
License: MIT License
When loading a skeleton with assimp, the node hierarchy may contain multiple nodes with same name. Only nodes that are referenced by bones are guaranteed to have unique names.
cage-asset-processor currently fails in such situations.
cage/cage.pack
cage/font/font.pack
pipe eof
cage/model/bone.obj
processing asset 'cage/font/font.pack' failed
cage/model/fake.obj
cage/texture/gui.psd
cage/model/model.pack
malytomas@home-windows:~/dnt$ ldd dntgenerator
linux-vdso.so.1 (0x00007ffd60d83000)
libcage-core.so => /home/malytomas/dnt/./libcage-core.so (0x00007f6578bda000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f6578963000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f657887a000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f6578856000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6578651000)
libdeflate.so.0 => /lib/x86_64-linux-gnu/libdeflate.so.0 (0x00007f657863c000)
libjbig.so.0 => /lib/x86_64-linux-gnu/libjbig.so.0 (0x00007f657862b000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f65785f9000)
/lib64/ld-linux-x86-64.so.2 (0x00007f65796b6000)
deflate, jbig, lzma
reported by @tivvit
aggregation
blocking array
async array
fire and forget
performance
assert 'idx < size()' failed
commit: b9a3651
actions: https://github.com/ucpu/cage/runs/8002238965?check_suite_focus=true
launching an application in full-screen would immediately lose focus and put the app to taskbar - in background.
the same happens when switching already running application from window to fullscreen.
happens on linux, works correctly on windows.
note: the tasks listed here are NOT in any particular order
each light should have configuration whether it is affected by ambient occlusion
When a menu is collapsed in a way that it disappears from under the cursor, it counts as a camera movement and it should not.
store different channels counts in different formats
4
.png
.tiff
Creating TIFF with legacy Deflate codec identifier, COMPRESSION_ADOBE_DEFLATE is more widely supported
Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.
.tga
.psd
AddressSanitizer:DEADLYSIGNAL
.dds
=================================================================
==9188==ERROR: AddressSanitizer: SEGV on unknown address 0x000000020888 (pc 0x7fb5fada1ce4 bp 0x7ffd04cbcef0 sp 0x7ffd04cbcda0 T0)
==9188==The signal is caused by a WRITE memory access.
#0 0x7fb5fada1ce4 in basisu::basisu_encoder_init(bool, bool) (/home/runner/work/cage/cage/build/result/release/libcage-core.so+0x1301ce4) (BuildId: d08f28f6889f19631d8f4ad4593e2e02ed9238d0)
#1 0x7fb5f9e5d2f5 in cage::imageKtxTranscode(cage::PointerRange<cage::Image const*>, cage::ImageKtxEncodeConfig const&, cage::ImageKtxTranscodeConfig const&) (/home/runner/work/cage/cage/build/result/release/libcage-core.so+0x3bd2f5) (BuildId: d08f28f6889f19631d8f4ad4593e2e02ed9238d0)
#2 0x7fb5f9df06a5 in cage::imageBc3Encode(cage::Image const*, cage::ImageKtxEncodeConfig const&) (/home/runner/work/cage/cage/build/result/release/libcage-core.so+0x3506a5) (BuildId: d08f28f6889f19631d8f4ad4593e2e02ed9238d0)
#3 0x7fb5f9df949c in cage::ddsEncode(cage::ImageImpl const*) (/home/runner/work/cage/cage/build/result/release/libcage-core.so+0x35949c) (BuildId: d08f28f6889f19631d8f4ad4593e2e02ed9238d0)
#4 0x7fb5f9e37377 in cage::Image::exportBuffer(cage::detail::StringBase<1019u> const&) const (/home/runner/work/cage/cage/build/result/release/libcage-core.so+0x397377) (BuildId: d08f28f6889f19631d8f4ad4593e2e02ed9238d0)
#5 0x7fb5f9e37c46 in cage::Image::exportFile(cage::detail::StringBase<1019u> const&) const (/home/runner/work/cage/cage/build/result/release/libcage-core.so+0x397c46) (BuildId: d08f28f6889f19631d8f4ad4593e2e02ed9238d0)
#6 0x56245f64282f in testImage() (/home/runner/work/cage/cage/build/result/release/cage-test-core+0x2e182f) (BuildId: f010e0d4c9bfe37d69dfb473dd3704824cca847f)
#7 0x56245f67e241 in main (/home/runner/work/cage/cage/build/result/release/cage-test-core+0x31d241) (BuildId: f010e0d4c9bfe37d69dfb473dd3704824cca847f)
#8 0x7fb5f9564d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) (BuildId: 69389d485a9793dbe873f0ea2c93e02efaa9aa3d)
#9 0x7fb5f9564e3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f) (BuildId: 69389d485a9793dbe873f0ea2c93e02efaa9aa3d)
#10 0x56245f3fc384 in _start (/home/runner/work/cage/cage/build/result/release/cage-test-core+0x9b384) (BuildId: f010e0d4c9bfe37d69dfb473dd3704824cca847f)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/home/runner/work/cage/cage/build/result/release/libcage-core.so+0x1301ce4) (BuildId: d08f28f6889f19631d8f4ad4593e2e02ed9238d0) in basisu::basisu_encoder_init(bool, bool)
commit: 6b7a4bf
actions: https://github.com/ucpu/cage/actions/runs/3614705868/jobs/6091319115
preliminary research results:
this roadmap
vulkan frameworks research & evaluation
preparations
disable opengl
initial vulkan
vulkan engine
final polishing
on linux (ubuntu bionic) the camera controller is too much sensitive about mouse inputs
Found probable issue in clang: llvm/llvm-project#56626
More information in: https://github.com/malytomas/clang-issue
Provided workaround in basis_universal: BinomialLLC/basis_universal#313
Found in commit: f161d55
concurrent randomized recursive archive files
renamed thread id '139974375610112' to 'tester_0'
renamed thread id '139974392391424' to 'tester_1'
renamed thread id '139974460888832' to 'tester_2'
iteration: 0
renamed thread id '139974409172736' to 'tester_3'
iteration: 1
iteration: 2
iteration: 3
==================
WARNING: ThreadSanitizer: data race (pid=10124)
Write of size 8 at 0x7b640003fb88 by thread T11 (mutexes: write M335653498068705232):
#0 cage::(anonymous namespace)::FileReal::reopenForModification() <null> (libcage-core.so+0xfd4e5)
#1 cage::(anonymous namespace)::FileZip::reopenForModificationInternal() <null> (libcage-core.so+0x103869)
#2 cage::(anonymous namespace)::FileZip::reopenForModification() <null> (libcage-core.so+0x103385)
#3 cage::(anonymous namespace)::ArchiveZip::openFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0x10065f)
#4 cage::newFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0xeeff9)
#5 cage::writeFile(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xef21f)
#6 cage::Delegate<void (unsigned int, unsigned int)>& cage::Delegate<void (unsigned int, unsigned int)>::bind<(anonymous namespace)::ConcurrentTester<0u>, &((anonymous namespace)::ConcurrentTester<0u>::threadEntry(unsigned int, unsigned int))>((anonymous namespace)::ConcurrentTester<0u>*)::'lambda'(void*, unsigned int, unsigned int)::__invoke(void*, unsigned int, unsigned int) <null> (cage-test-core+0x4d70be)
#7 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<cage::(anonymous namespace)::ThreadPoolImpl, &(cage::(anonymous namespace)::ThreadPoolImpl::threadEntryLocal())>(cage::(anonymous namespace)::ThreadPoolImpl*)::'lambda'(void*)::__invoke(void*) <null> (libcage-core.so+0x219ea1)
#8 cage::(anonymous namespace)::threadFunctionImpl(void*) <null> (libcage-core.so+0xca660)
Previous read of size 8 at 0x7b640003fb88 by thread T13 (mutexes: write M330868423464623920, write M328616623650938992):
#0 cage::(anonymous namespace)::FileReal::seek(unsigned long) <null> (libcage-core.so+0xfd0b5)
#1 cage::(anonymous namespace)::ProxyFile::read(cage::PointerRange<char>) <null> (libcage-core.so+0x1034cf)
#2 cage::(anonymous namespace)::FileZip::read(cage::PointerRange<char>) <null> (libcage-core.so+0x102da0)
#3 cage::(anonymous namespace)::ProxyFile::read(cage::PointerRange<char>) <null> (libcage-core.so+0x1034fc)
#4 cage::(anonymous namespace)::FileZip::read(cage::PointerRange<char>) <null> (libcage-core.so+0x102da0)
#5 cage::File::readAll() <null> (libcage-core.so+0xee892)
#6 cage::Delegate<void (unsigned int, unsigned int)>& cage::Delegate<void (unsigned int, unsigned int)>::bind<(anonymous namespace)::ConcurrentTester<0u>, &((anonymous namespace)::ConcurrentTester<0u>::threadEntry(unsigned int, unsigned int))>((anonymous namespace)::ConcurrentTester<0u>*)::'lambda'(void*, unsigned int, unsigned int)::__invoke(void*, unsigned int, unsigned int) <null> (cage-test-core+0x4d704d)
#7 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<cage::(anonymous namespace)::ThreadPoolImpl, &(cage::(anonymous namespace)::ThreadPoolImpl::threadEntryLocal())>(cage::(anonymous namespace)::ThreadPoolImpl*)::'lambda'(void*)::__invoke(void*) <null> (libcage-core.so+0x219ea1)
#8 cage::(anonymous namespace)::threadFunctionImpl(void*) <null> (libcage-core.so+0xca660)
Location is heap block of size 1216 at 0x7b640003f700 allocated by thread T13:
#0 aligned_alloc <null> (cage-test-core+0x437dd0)
#1 void* cage::privat::MemoryArenaStub::allocate<cage::(anonymous namespace)::SystemMemoryArenaImpl>(void*, unsigned long, unsigned long) <null> (libcage-core.so+0x179fdf)
#2 cage::MemoryArena::allocate(unsigned long, unsigned long) <null> (libcage-core.so+0x179b69)
#3 cage::realNewFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0xfbc7e)
#4 cage::(anonymous namespace)::ArchiveReal::openFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0xfdf2a)
#5 cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>& cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>::bind<cage::ArchiveAbstract*, &(cage::(anonymous namespace)::archiveCtorArchive(cage::ArchiveAbstract*, cage::detail::StringBase<1019u> const&))>(cage::ArchiveAbstract*)::'lambda'(void*, cage::detail::StringBase<1019u> const&)::__invoke(void*, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xf372e)
#6 cage::(anonymous namespace)::ArchivesCache::getOrCreate(cage::detail::StringBase<1019u> const&, cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>) <null> (libcage-core.so+0xf26aa)
#7 cage::(anonymous namespace)::archiveFindIterate(std::shared_ptr<cage::ArchiveAbstract>, cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf2b0a)
#8 cage::archiveFindTowardsRoot(cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf1ddd)
#9 cage::newFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0xeefd6)
#10 cage::readFile(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xef1bf)
#11 cage::Delegate<void (unsigned int, unsigned int)>& cage::Delegate<void (unsigned int, unsigned int)>::bind<(anonymous namespace)::ConcurrentTester<0u>, &((anonymous namespace)::ConcurrentTester<0u>::threadEntry(unsigned int, unsigned int))>((anonymous namespace)::ConcurrentTester<0u>*)::'lambda'(void*, unsigned int, unsigned int)::__invoke(void*, unsigned int, unsigned int) <null> (cage-test-core+0x4d702f)
#12 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<cage::(anonymous namespace)::ThreadPoolImpl, &(cage::(anonymous namespace)::ThreadPoolImpl::threadEntryLocal())>(cage::(anonymous namespace)::ThreadPoolImpl*)::'lambda'(void*)::__invoke(void*) <null> (libcage-core.so+0x219ea1)
#13 cage::(anonymous namespace)::threadFunctionImpl(void*) <null> (libcage-core.so+0xca660)
Mutex M335653498068705232 is already destroyed.
Mutex M330868423464623920 is already destroyed.
Mutex M328616623650938992 is already destroyed.
Thread T11 'tester_0' (tid=10200, running) created by main thread at:
#0 pthread_create <null> (cage-test-core+0x43867b)
#1 cage::newThread(cage::Delegate<void ()>, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xc9cc9)
#2 cage::newThreadPool(cage::detail::StringBase<1019u> const&, unsigned int) <null> (libcage-core.so+0x219aea)
#3 testArchivesRecursion() <null> (cage-test-core+0x4d5698)
#4 main <null> (cage-test-core+0x579539)
Thread T13 'tester_2' (tid=10202, running) created by main thread at:
#0 pthread_create <null> (cage-test-core+0x43867b)
#1 cage::newThread(cage::Delegate<void ()>, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xc9cc9)
#2 cage::newThreadPool(cage::detail::StringBase<1019u> const&, unsigned int) <null> (libcage-core.so+0x219aea)
#3 testArchivesRecursion() <null> (cage-test-core+0x4d5698)
#4 main <null> (cage-test-core+0x579539)
SUMMARY: ThreadSanitizer: data race (/home/runner/work/cage/cage/build/result/release/libcage-core.so+0xfd4e5) in cage::(anonymous namespace)::FileReal::reopenForModification()
==================
==================
WARNING: ThreadSanitizer: data race (pid=10124)
Read of size 4 at 0x7b640003fb80 by thread T14 (mutexes: write M341282997602897952):
#0 cage::FileAbstract::mode() const <null> (libcage-core.so+0xf17fd)
#1 cage::(anonymous namespace)::FileZip::reopenForModificationInternal() <null> (libcage-core.so+0x103846)
#2 cage::(anonymous namespace)::FileZip::reopenForModification() <null> (libcage-core.so+0x103385)
#3 cage::(anonymous namespace)::ArchiveZip::openFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0x10065f)
#4 cage::newFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0xeeff9)
#5 cage::writeFile(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xef21f)
#6 cage::Delegate<void (unsigned int, unsigned int)>& cage::Delegate<void (unsigned int, unsigned int)>::bind<(anonymous namespace)::ConcurrentTester<0u>, &((anonymous namespace)::ConcurrentTester<0u>::threadEntry(unsigned int, unsigned int))>((anonymous namespace)::ConcurrentTester<0u>*)::'lambda'(void*, unsigned int, unsigned int)::__invoke(void*, unsigned int, unsigned int) <null> (cage-test-core+0x4d70be)
#7 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<cage::(anonymous namespace)::ThreadPoolImpl, &(cage::(anonymous namespace)::ThreadPoolImpl::threadEntryLocal())>(cage::(anonymous namespace)::ThreadPoolImpl*)::'lambda'(void*)::__invoke(void*) <null> (libcage-core.so+0x219ea1)
#8 cage::(anonymous namespace)::threadFunctionImpl(void*) <null> (libcage-core.so+0xca660)
Previous write of size 1 at 0x7b640003fb81 by thread T11 (mutexes: write M335653498068705232):
#0 cage::(anonymous namespace)::FileReal::reopenForModification() <null> (libcage-core.so+0xfd486)
#1 cage::(anonymous namespace)::FileZip::reopenForModificationInternal() <null> (libcage-core.so+0x103869)
#2 cage::(anonymous namespace)::FileZip::reopenForModification() <null> (libcage-core.so+0x103385)
#3 cage::(anonymous namespace)::ArchiveZip::openFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0x10065f)
#4 cage::newFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0xeeff9)
#5 cage::writeFile(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xef21f)
#6 cage::Delegate<void (unsigned int, unsigned int)>& cage::Delegate<void (unsigned int, unsigned int)>::bind<(anonymous namespace)::ConcurrentTester<0u>, &((anonymous namespace)::ConcurrentTester<0u>::threadEntry(unsigned int, unsigned int))>((anonymous namespace)::ConcurrentTester<0u>*)::'lambda'(void*, unsigned int, unsigned int)::__invoke(void*, unsigned int, unsigned int) <null> (cage-test-core+0x4d70be)
#7 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<cage::(anonymous namespace)::ThreadPoolImpl, &(cage::(anonymous namespace)::ThreadPoolImpl::threadEntryLocal())>(cage::(anonymous namespace)::ThreadPoolImpl*)::'lambda'(void*)::__invoke(void*) <null> (libcage-core.so+0x219ea1)
#8 cage::(anonymous namespace)::threadFunctionImpl(void*) <null> (libcage-core.so+0xca660)
Location is heap block of size 1216 at 0x7b640003f700 allocated by thread T13:
#0 aligned_alloc <null> (cage-test-core+0x437dd0)
#1 void* cage::privat::MemoryArenaStub::allocate<cage::(anonymous namespace)::SystemMemoryArenaImpl>(void*, unsigned long, unsigned long) <null> (libcage-core.so+0x179fdf)
#2 cage::MemoryArena::allocate(unsigned long, unsigned long) <null> (libcage-core.so+0x179b69)
#3 cage::realNewFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0xfbc7e)
#4 cage::(anonymous namespace)::ArchiveReal::openFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0xfdf2a)
#5 cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>& cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>::bind<cage::ArchiveAbstract*, &(cage::(anonymous namespace)::archiveCtorArchive(cage::ArchiveAbstract*, cage::detail::StringBase<1019u> const&))>(cage::ArchiveAbstract*)::'lambda'(void*, cage::detail::StringBase<1019u> const&)::__invoke(void*, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xf372e)
#6 cage::(anonymous namespace)::ArchivesCache::getOrCreate(cage::detail::StringBase<1019u> const&, cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>) <null> (libcage-core.so+0xf26aa)
#7 cage::(anonymous namespace)::archiveFindIterate(std::shared_ptr<cage::ArchiveAbstract>, cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf2b0a)
#8 cage::archiveFindTowardsRoot(cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf1ddd)
#9 cage::newFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0xeefd6)
#10 cage::readFile(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xef1bf)
#11 cage::Delegate<void (unsigned int, unsigned int)>& cage::Delegate<void (unsigned int, unsigned int)>::bind<(anonymous namespace)::ConcurrentTester<0u>, &((anonymous namespace)::ConcurrentTester<0u>::threadEntry(unsigned int, unsigned int))>((anonymous namespace)::ConcurrentTester<0u>*)::'lambda'(void*, unsigned int, unsigned int)::__invoke(void*, unsigned int, unsigned int) <null> (cage-test-core+0x4d702f)
#12 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<cage::(anonymous namespace)::ThreadPoolImpl, &(cage::(anonymous namespace)::ThreadPoolImpl::threadEntryLocal())>(cage::(anonymous namespace)::ThreadPoolImpl*)::'lambda'(void*)::__invoke(void*) <null> (libcage-core.so+0x219ea1)
#13 cage::(anonymous namespace)::threadFunctionImpl(void*) <null> (libcage-core.so+0xca660)
Mutex M341282997602897952 is already destroyed.
Mutex M335653498068705232 is already destroyed.
Thread T14 'tester_3' (tid=10203, running) created by main thread at:
#0 pthread_create <null> (cage-test-core+0x43867b)
#1 cage::newThread(cage::Delegate<void ()>, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xc9cc9)
#2 cage::newThreadPool(cage::detail::StringBase<1019u> const&, unsigned int) <null> (libcage-core.so+0x219aea)
#3 testArchivesRecursion() <null> (cage-test-core+0x4d5698)
#4 main <null> (cage-test-core+0x579539)
Thread T11 'tester_0' (tid=10200, running) created by main thread at:
#0 pthread_create <null> (cage-test-core+0x43867b)
#1 cage::newThread(cage::Delegate<void ()>, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xc9cc9)
#2 cage::newThreadPool(cage::detail::StringBase<1019u> const&, unsigned int) <null> (libcage-core.so+0x219aea)
#3 testArchivesRecursion() <null> (cage-test-core+0x4d5698)
#4 main <null> (cage-test-core+0x579539)
Thread T13 'tester_2' (tid=10202, running) created by main thread at:
#0 pthread_create <null> (cage-test-core+0x43867b)
#1 cage::newThread(cage::Delegate<void ()>, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xc9cc9)
#2 cage::newThreadPool(cage::detail::StringBase<1019u> const&, unsigned int) <null> (libcage-core.so+0x219aea)
#3 testArchivesRecursion() <null> (cage-test-core+0x4d5698)
#4 main <null> (cage-test-core+0x579539)
SUMMARY: ThreadSanitizer: data race (/home/runner/work/cage/cage/build/result/release/libcage-core.so+0xf17fd) in cage::FileAbstract::mode() const
==================
iteration: 4
iteration: 5
==================
WARNING: ThreadSanitizer: data race (pid=10124)
Write of size 8 at 0x7b6400040f88 by thread T12 (mutexes: write M132757):
#0 cage::(anonymous namespace)::FileReal::reopenForModification() <null> (libcage-core.so+0xfd4e5)
#1 cage::(anonymous namespace)::FileZip::reopenForModificationInternal() <null> (libcage-core.so+0x103869)
#2 cage::(anonymous namespace)::FileZip::reopenForModification() <null> (libcage-core.so+0x103385)
#3 cage::(anonymous namespace)::ArchiveZip::remove(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0x100108)
#4 cage::pathRemove(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xf052d)
#5 cage::Delegate<void (unsigned int, unsigned int)>& cage::Delegate<void (unsigned int, unsigned int)>::bind<(anonymous namespace)::ConcurrentTester<0u>, &((anonymous namespace)::ConcurrentTester<0u>::threadEntry(unsigned int, unsigned int))>((anonymous namespace)::ConcurrentTester<0u>*)::'lambda'(void*, unsigned int, unsigned int)::__invoke(void*, unsigned int, unsigned int) <null> (cage-test-core+0x4d700b)
#6 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<cage::(anonymous namespace)::ThreadPoolImpl, &(cage::(anonymous namespace)::ThreadPoolImpl::threadEntryLocal())>(cage::(anonymous namespace)::ThreadPoolImpl*)::'lambda'(void*)::__invoke(void*) <null> (libcage-core.so+0x219ea1)
#7 cage::(anonymous namespace)::threadFunctionImpl(void*) <null> (libcage-core.so+0xca660)
Previous read of size 8 at 0x7b6400040f88 by thread T11 (mutexes: write M677927069748822688, write M678771494678954976, write M132749):
#0 cage::(anonymous namespace)::FileReal::seek(unsigned long) <null> (libcage-core.so+0xfd0b5)
#1 cage::(anonymous namespace)::ProxyFile::read(cage::PointerRange<char>) <null> (libcage-core.so+0x1034cf)
#2 cage::(anonymous namespace)::FileZip::read(cage::PointerRange<char>) <null> (libcage-core.so+0x102da0)
#3 cage::File::read(unsigned long) <null> (libcage-core.so+0xee7e0)
#4 cage::(anonymous namespace)::ArchiveZip::ArchiveZip(cage::Holder<cage::File>&&, bool) <null> (libcage-core.so+0x10495e)
#5 cage::archiveOpenZipTry(cage::Holder<cage::File>&&) <null> (libcage-core.so+0xff937)
#6 cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>& cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>::bind<cage::ArchiveAbstract*, &(cage::(anonymous namespace)::archiveCtorArchive(cage::ArchiveAbstract*, cage::detail::StringBase<1019u> const&))>(cage::ArchiveAbstract*)::'lambda'(void*, cage::detail::StringBase<1019u> const&)::__invoke(void*, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xf373b)
#7 cage::(anonymous namespace)::ArchivesCache::getOrCreate(cage::detail::StringBase<1019u> const&, cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>) <null> (libcage-core.so+0xf26aa)
#8 cage::(anonymous namespace)::archiveFindIterate(std::shared_ptr<cage::ArchiveAbstract>, cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf2b0a)
#9 cage::(anonymous namespace)::archiveFindIterate(std::shared_ptr<cage::ArchiveAbstract>, cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf2dc5)
#10 cage::archiveFindTowardsRoot(cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf1ddd)
#11 cage::newFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0xeefd6)
#12 cage::writeFile(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xef21f)
#13 cage::Delegate<void (unsigned int, unsigned int)>& cage::Delegate<void (unsigned int, unsigned int)>::bind<(anonymous namespace)::ConcurrentTester<0u>, &((anonymous namespace)::ConcurrentTester<0u>::threadEntry(unsigned int, unsigned int))>((anonymous namespace)::ConcurrentTester<0u>*)::'lambda'(void*, unsigned int, unsigned int)::__invoke(void*, unsigned int, unsigned int) <null> (cage-test-core+0x4d70be)
#14 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<cage::(anonymous namespace)::ThreadPoolImpl, &(cage::(anonymous namespace)::ThreadPoolImpl::threadEntryLocal())>(cage::(anonymous namespace)::ThreadPoolImpl*)::'lambda'(void*)::__invoke(void*) <null> (libcage-core.so+0x219ea1)
#15 cage::(anonymous namespace)::threadFunctionImpl(void*) <null> (libcage-core.so+0xca660)
Location is heap block of size 1216 at 0x7b6400040b00 allocated by thread T12:
#0 aligned_alloc <null> (cage-test-core+0x437dd0)
#1 void* cage::privat::MemoryArenaStub::allocate<cage::(anonymous namespace)::SystemMemoryArenaImpl>(void*, unsigned long, unsigned long) <null> (libcage-core.so+0x179fdf)
#2 cage::MemoryArena::allocate(unsigned long, unsigned long) <null> (libcage-core.so+0x179b69)
#3 cage::realNewFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0xfbc7e)
#4 cage::(anonymous namespace)::ArchiveReal::openFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0xfdf2a)
#5 cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>& cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>::bind<cage::ArchiveAbstract*, &(cage::(anonymous namespace)::archiveCtorArchive(cage::ArchiveAbstract*, cage::detail::StringBase<1019u> const&))>(cage::ArchiveAbstract*)::'lambda'(void*, cage::detail::StringBase<1019u> const&)::__invoke(void*, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xf372e)
#6 cage::(anonymous namespace)::ArchivesCache::getOrCreate(cage::detail::StringBase<1019u> const&, cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>) <null> (libcage-core.so+0xf26aa)
#7 cage::(anonymous namespace)::archiveFindIterate(std::shared_ptr<cage::ArchiveAbstract>, cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf2b0a)
#8 cage::archiveFindTowardsRoot(cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf1ddd)
#9 cage::pathRemove(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xf0510)
#10 cage::Delegate<void (unsigned int, unsigned int)>& cage::Delegate<void (unsigned int, unsigned int)>::bind<(anonymous namespace)::ConcurrentTester<0u>, &((anonymous namespace)::ConcurrentTester<0u>::threadEntry(unsigned int, unsigned int))>((anonymous namespace)::ConcurrentTester<0u>*)::'lambda'(void*, unsigned int, unsigned int)::__invoke(void*, unsigned int, unsigned int) <null> (cage-test-core+0x4d700b)
#11 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<cage::(anonymous namespace)::ThreadPoolImpl, &(cage::(anonymous namespace)::ThreadPoolImpl::threadEntryLocal())>(cage::(anonymous namespace)::ThreadPoolImpl*)::'lambda'(void*)::__invoke(void*) <null> (libcage-core.so+0x219ea1)
#12 cage::(anonymous namespace)::threadFunctionImpl(void*) <null> (libcage-core.so+0xca660)
Mutex M132757 (0x7b1400007820) created at:
#0 pthread_mutex_init <null> (cage-test-core+0x439aed)
#1 cage::newMutex() <null> (libcage-core.so+0xc8ca8)
#2 cage::(anonymous namespace)::ArchiveZip::ArchiveZip(cage::Holder<cage::File>&&, bool) <null> (libcage-core.so+0x1044a1)
#3 cage::archiveOpenZipTry(cage::Holder<cage::File>&&) <null> (libcage-core.so+0xff937)
#4 cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>& cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>::bind<cage::ArchiveAbstract*, &(cage::(anonymous namespace)::archiveCtorArchive(cage::ArchiveAbstract*, cage::detail::StringBase<1019u> const&))>(cage::ArchiveAbstract*)::'lambda'(void*, cage::detail::StringBase<1019u> const&)::__invoke(void*, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xf373b)
#5 cage::(anonymous namespace)::ArchivesCache::getOrCreate(cage::detail::StringBase<1019u> const&, cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>) <null> (libcage-core.so+0xf26aa)
#6 cage::(anonymous namespace)::archiveFindIterate(std::shared_ptr<cage::ArchiveAbstract>, cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf2b0a)
#7 cage::(anonymous namespace)::archiveFindIterate(std::shared_ptr<cage::ArchiveAbstract>, cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf2dc5)
#8 cage::archiveFindTowardsRoot(cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf1ddd)
#9 cage::pathRemove(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xf0510)
#10 cage::Delegate<void (unsigned int, unsigned int)>& cage::Delegate<void (unsigned int, unsigned int)>::bind<(anonymous namespace)::ConcurrentTester<0u>, &((anonymous namespace)::ConcurrentTester<0u>::threadEntry(unsigned int, unsigned int))>((anonymous namespace)::ConcurrentTester<0u>*)::'lambda'(void*, unsigned int, unsigned int)::__invoke(void*, unsigned int, unsigned int) <null> (cage-test-core+0x4d700b)
#11 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<cage::(anonymous namespace)::ThreadPoolImpl, &(cage::(anonymous namespace)::ThreadPoolImpl::threadEntryLocal())>(cage::(anonymous namespace)::ThreadPoolImpl*)::'lambda'(void*)::__invoke(void*) <null> (libcage-core.so+0x219ea1)
#12 cage::(anonymous namespace)::threadFunctionImpl(void*) <null> (libcage-core.so+0xca660)
Mutex M677927069748822688 is already destroyed.
Mutex M678771494678954976 is already destroyed.
Mutex M132749 (0x7b140000a110) created at:
#0 pthread_mutex_init <null> (cage-test-core+0x439aed)
#1 cage::newMutex() <null> (libcage-core.so+0xc8ca8)
#2 cage::(anonymous namespace)::ArchiveZip::ArchiveZip(cage::Holder<cage::File>&&, bool) <null> (libcage-core.so+0x1044a1)
#3 cage::archiveOpenZipTry(cage::Holder<cage::File>&&) <null> (libcage-core.so+0xff937)
#4 cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>& cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>::bind<cage::ArchiveAbstract*, &(cage::(anonymous namespace)::archiveCtorArchive(cage::ArchiveAbstract*, cage::detail::StringBase<1019u> const&))>(cage::ArchiveAbstract*)::'lambda'(void*, cage::detail::StringBase<1019u> const&)::__invoke(void*, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xf373b)
#5 cage::(anonymous namespace)::ArchivesCache::getOrCreate(cage::detail::StringBase<1019u> const&, cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>) <null> (libcage-core.so+0xf26aa)
#6 cage::(anonymous namespace)::archiveFindIterate(std::shared_ptr<cage::ArchiveAbstract>, cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf2b0a)
#7 cage::archiveFindTowardsRoot(cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf1ddd)
#8 cage::pathRemove(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xf0510)
#9 cage::Delegate<void (unsigned int, unsigned int)>& cage::Delegate<void (unsigned int, unsigned int)>::bind<(anonymous namespace)::ConcurrentTester<0u>, &((anonymous namespace)::ConcurrentTester<0u>::threadEntry(unsigned int, unsigned int))>((anonymous namespace)::ConcurrentTester<0u>*)::'lambda'(void*, unsigned int, unsigned int)::__invoke(void*, unsigned int, unsigned int) <null> (cage-test-core+0x4d700b)
#10 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<cage::(anonymous namespace)::ThreadPoolImpl, &(cage::(anonymous namespace)::ThreadPoolImpl::threadEntryLocal())>(cage::(anonymous namespace)::ThreadPoolImpl*)::'lambda'(void*)::__invoke(void*) <null> (libcage-core.so+0x219ea1)
#11 cage::(anonymous namespace)::threadFunctionImpl(void*) <null> (libcage-core.so+0xca660)
Thread T12 'tester_1' (tid=10201, running) created by main thread at:
#0 pthread_create <null> (cage-test-core+0x43867b)
#1 cage::newThread(cage::Delegate<void ()>, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xc9cc9)
#2 cage::newThreadPool(cage::detail::StringBase<1019u> const&, unsigned int) <null> (libcage-core.so+0x219aea)
#3 testArchivesRecursion() <null> (cage-test-core+0x4d5698)
#4 main <null> (cage-test-core+0x579539)
Thread T11 'tester_0' (tid=10200, running) created by main thread at:
#0 pthread_create <null> (cage-test-core+0x43867b)
#1 cage::newThread(cage::Delegate<void ()>, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xc9cc9)
#2 cage::newThreadPool(cage::detail::StringBase<1019u> const&, unsigned int) <null> (libcage-core.so+0x219aea)
#3 testArchivesRecursion() <null> (cage-test-core+0x4d5698)
#4 main <null> (cage-test-core+0x579539)
SUMMARY: ThreadSanitizer: data race (/home/runner/work/cage/cage/build/result/release/libcage-core.so+0xfd4e5) in cage::(anonymous namespace)::FileReal::reopenForModification()
==================
==================
WARNING: ThreadSanitizer: data race (pid=10124)
Read of size 4 at 0x7b6400040f80 by thread T11 (mutexes: write M132774):
#0 cage::FileAbstract::mode() const <null> (libcage-core.so+0xf17fd)
#1 cage::(anonymous namespace)::FileZip::reopenForModificationInternal() <null> (libcage-core.so+0x103846)
#2 cage::(anonymous namespace)::FileZip::reopenForModification() <null> (libcage-core.so+0x103385)
#3 cage::(anonymous namespace)::ArchiveZip::openFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0x10065f)
#4 cage::newFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0xeeff9)
#5 cage::writeFile(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xef21f)
#6 cage::Delegate<void (unsigned int, unsigned int)>& cage::Delegate<void (unsigned int, unsigned int)>::bind<(anonymous namespace)::ConcurrentTester<0u>, &((anonymous namespace)::ConcurrentTester<0u>::threadEntry(unsigned int, unsigned int))>((anonymous namespace)::ConcurrentTester<0u>*)::'lambda'(void*, unsigned int, unsigned int)::__invoke(void*, unsigned int, unsigned int) <null> (cage-test-core+0x4d70be)
#7 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<cage::(anonymous namespace)::ThreadPoolImpl, &(cage::(anonymous namespace)::ThreadPoolImpl::threadEntryLocal())>(cage::(anonymous namespace)::ThreadPoolImpl*)::'lambda'(void*)::__invoke(void*) <null> (libcage-core.so+0x219ea1)
#8 cage::(anonymous namespace)::threadFunctionImpl(void*) <null> (libcage-core.so+0xca660)
Previous write of size 1 at 0x7b6400040f81 by thread T12 (mutexes: write M474420661587048480):
#0 cage::(anonymous namespace)::FileReal::reopenForModification() <null> (libcage-core.so+0xfd486)
#1 cage::(anonymous namespace)::FileZip::reopenForModificationInternal() <null> (libcage-core.so+0x103869)
#2 cage::(anonymous namespace)::FileZip::reopenForModification() <null> (libcage-core.so+0x103385)
#3 cage::(anonymous namespace)::ArchiveZip::remove(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0x100108)
#4 cage::pathRemove(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xf052d)
#5 cage::Delegate<void (unsigned int, unsigned int)>& cage::Delegate<void (unsigned int, unsigned int)>::bind<(anonymous namespace)::ConcurrentTester<0u>, &((anonymous namespace)::ConcurrentTester<0u>::threadEntry(unsigned int, unsigned int))>((anonymous namespace)::ConcurrentTester<0u>*)::'lambda'(void*, unsigned int, unsigned int)::__invoke(void*, unsigned int, unsigned int) <null> (cage-test-core+0x4d700b)
#6 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<cage::(anonymous namespace)::ThreadPoolImpl, &(cage::(anonymous namespace)::ThreadPoolImpl::threadEntryLocal())>(cage::(anonymous namespace)::ThreadPoolImpl*)::'lambda'(void*)::__invoke(void*) <null> (libcage-core.so+0x219ea1)
#7 cage::(anonymous namespace)::threadFunctionImpl(void*) <null> (libcage-core.so+0xca660)
Location is heap block of size 1216 at 0x7b6400040b00 allocated by thread T12:
#0 aligned_alloc <null> (cage-test-core+0x437dd0)
#1 void* cage::privat::MemoryArenaStub::allocate<cage::(anonymous namespace)::SystemMemoryArenaImpl>(void*, unsigned long, unsigned long) <null> (libcage-core.so+0x179fdf)
#2 cage::MemoryArena::allocate(unsigned long, unsigned long) <null> (libcage-core.so+0x179b69)
#3 cage::realNewFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0xfbc7e)
#4 cage::(anonymous namespace)::ArchiveReal::openFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0xfdf2a)
#5 cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>& cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>::bind<cage::ArchiveAbstract*, &(cage::(anonymous namespace)::archiveCtorArchive(cage::ArchiveAbstract*, cage::detail::StringBase<1019u> const&))>(cage::ArchiveAbstract*)::'lambda'(void*, cage::detail::StringBase<1019u> const&)::__invoke(void*, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xf372e)
#6 cage::(anonymous namespace)::ArchivesCache::getOrCreate(cage::detail::StringBase<1019u> const&, cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>) <null> (libcage-core.so+0xf26aa)
#7 cage::(anonymous namespace)::archiveFindIterate(std::shared_ptr<cage::ArchiveAbstract>, cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf2b0a)
#8 cage::archiveFindTowardsRoot(cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf1ddd)
#9 cage::pathRemove(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xf0510)
#10 cage::Delegate<void (unsigned int, unsigned int)>& cage::Delegate<void (unsigned int, unsigned int)>::bind<(anonymous namespace)::ConcurrentTester<0u>, &((anonymous namespace)::ConcurrentTester<0u>::threadEntry(unsigned int, unsigned int))>((anonymous namespace)::ConcurrentTester<0u>*)::'lambda'(void*, unsigned int, unsigned int)::__invoke(void*, unsigned int, unsigned int) <null> (cage-test-core+0x4d700b)
#11 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<cage::(anonymous namespace)::ThreadPoolImpl, &(cage::(anonymous namespace)::ThreadPoolImpl::threadEntryLocal())>(cage::(anonymous namespace)::ThreadPoolImpl*)::'lambda'(void*)::__invoke(void*) <null> (libcage-core.so+0x219ea1)
#12 cage::(anonymous namespace)::threadFunctionImpl(void*) <null> (libcage-core.so+0xca660)
Mutex M132774 (0x7b1400009fd0) created at:
#0 pthread_mutex_init <null> (cage-test-core+0x439aed)
#1 cage::newMutex() <null> (libcage-core.so+0xc8ca8)
#2 cage::(anonymous namespace)::ArchiveZip::ArchiveZip(cage::Holder<cage::File>&&, bool) <null> (libcage-core.so+0x1044a1)
#3 cage::archiveOpenZipTry(cage::Holder<cage::File>&&) <null> (libcage-core.so+0xff937)
#4 cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>& cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>::bind<cage::ArchiveAbstract*, &(cage::(anonymous namespace)::archiveCtorArchive(cage::ArchiveAbstract*, cage::detail::StringBase<1019u> const&))>(cage::ArchiveAbstract*)::'lambda'(void*, cage::detail::StringBase<1019u> const&)::__invoke(void*, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xf373b)
#5 cage::(anonymous namespace)::ArchivesCache::getOrCreate(cage::detail::StringBase<1019u> const&, cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>) <null> (libcage-core.so+0xf26aa)
#6 cage::(anonymous namespace)::archiveFindIterate(std::shared_ptr<cage::ArchiveAbstract>, cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf2b0a)
#7 cage::(anonymous namespace)::archiveFindIterate(std::shared_ptr<cage::ArchiveAbstract>, cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf2dc5)
#8 cage::archiveFindTowardsRoot(cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf1ddd)
#9 cage::newFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0xeefd6)
#10 cage::writeFile(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xef21f)
#11 cage::Delegate<void (unsigned int, unsigned int)>& cage::Delegate<void (unsigned int, unsigned int)>::bind<(anonymous namespace)::ConcurrentTester<0u>, &((anonymous namespace)::ConcurrentTester<0u>::threadEntry(unsigned int, unsigned int))>((anonymous namespace)::ConcurrentTester<0u>*)::'lambda'(void*, unsigned int, unsigned int)::__invoke(void*, unsigned int, unsigned int) <null> (cage-test-core+0x4d70be)
#12 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<cage::(anonymous namespace)::ThreadPoolImpl, &(cage::(anonymous namespace)::ThreadPoolImpl::threadEntryLocal())>(cage::(anonymous namespace)::ThreadPoolImpl*)::'lambda'(void*)::__invoke(void*) <null> (libcage-core.so+0x219ea1)
#13 cage::(anonymous namespace)::threadFunctionImpl(void*) <null> (libcage-core.so+0xca660)
Mutex M474420661587048480 is already destroyed.
Thread T11 'tester_0' (tid=10200, running) created by main thread at:
#0 pthread_create <null> (cage-test-core+0x43867b)
#1 cage::newThread(cage::Delegate<void ()>, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xc9cc9)
#2 cage::newThreadPool(cage::detail::StringBase<1019u> const&, unsigned int) <null> (libcage-core.so+0x219aea)
#3 testArchivesRecursion() <null> (cage-test-core+0x4d5698)
#4 main <null> (cage-test-core+0x579539)
Thread T12 'tester_1' (tid=10201, running) created by main thread at:
#0 pthread_create <null> (cage-test-core+0x43867b)
#1 cage::newThread(cage::Delegate<void ()>, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xc9cc9)
#2 cage::newThreadPool(cage::detail::StringBase<1019u> const&, unsigned int) <null> (libcage-core.so+0x219aea)
#3 testArchivesRecursion() <null> (cage-test-core+0x4d5698)
#4 main <null> (cage-test-core+0x579539)
SUMMARY: ThreadSanitizer: data race (/home/runner/work/cage/cage/build/result/release/libcage-core.so+0xf17fd) in cage::FileAbstract::mode() const
==================
iteration: 6
iteration: 7
iteration: 8
iteration: 9
thread 'tester_2' ended
thread 'tester_1' ended
thread 'tester_0' ended
thread 'tester_3' ended
renamed thread id '139974409172736' to 'tester_0'
renamed thread id '139974460888832' to 'tester_1'
renamed thread id '139974392391424' to 'tester_2'
iteration: 0
renamed thread id '139974375610112' to 'tester_3'
iteration: 1
iteration: 2
iteration: 3
iteration: 4
iteration: 5
==================
WARNING: ThreadSanitizer: data race (pid=10124)
Write of size 8 at 0x7b6400040a88 by thread T15 (mutexes: write M476109511447343056):
#0 cage::(anonymous namespace)::FileReal::reopenForModification() <null> (libcage-core.so+0xfd4e5)
#1 cage::(anonymous namespace)::FileZip::reopenForModificationInternal() <null> (libcage-core.so+0x103869)
#2 cage::(anonymous namespace)::FileZip::reopenForModification() <null> (libcage-core.so+0x103385)
#3 cage::(anonymous namespace)::ArchiveZip::remove(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0x100108)
#4 cage::pathRemove(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xf052d)
#5 cage::Delegate<void (unsigned int, unsigned int)>& cage::Delegate<void (unsigned int, unsigned int)>::bind<(anonymous namespace)::ConcurrentTester<1u>, &((anonymous namespace)::ConcurrentTester<1u>::threadEntry(unsigned int, unsigned int))>((anonymous namespace)::ConcurrentTester<1u>*)::'lambda'(void*, unsigned int, unsigned int)::__invoke(void*, unsigned int, unsigned int) <null> (cage-test-core+0x4d764b)
#6 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<cage::(anonymous namespace)::ThreadPoolImpl, &(cage::(anonymous namespace)::ThreadPoolImpl::threadEntryLocal())>(cage::(anonymous namespace)::ThreadPoolImpl*)::'lambda'(void*)::__invoke(void*) <null> (libcage-core.so+0x219ea1)
#7 cage::(anonymous namespace)::threadFunctionImpl(void*) <null> (libcage-core.so+0xca660)
Previous read of size 8 at 0x7b6400040a88 by thread T22 (mutexes: write M677927069748822688, write M678771494678954976, write M473857711633617008):
#0 cage::(anonymous namespace)::FileReal::seek(unsigned long) <null> (libcage-core.so+0xfd0b5)
#1 cage::(anonymous namespace)::ProxyFile::read(cage::PointerRange<char>) <null> (libcage-core.so+0x1034cf)
#2 cage::(anonymous namespace)::FileZip::read(cage::PointerRange<char>) <null> (libcage-core.so+0x102da0)
#3 cage::File::read(unsigned long) <null> (libcage-core.so+0xee7e0)
#4 cage::(anonymous namespace)::ArchiveZip::ArchiveZip(cage::Holder<cage::File>&&, bool) <null> (libcage-core.so+0x10495e)
#5 cage::archiveOpenZipTry(cage::Holder<cage::File>&&) <null> (libcage-core.so+0xff937)
#6 cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>& cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>::bind<cage::ArchiveAbstract*, &(cage::(anonymous namespace)::archiveCtorArchive(cage::ArchiveAbstract*, cage::detail::StringBase<1019u> const&))>(cage::ArchiveAbstract*)::'lambda'(void*, cage::detail::StringBase<1019u> const&)::__invoke(void*, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xf373b)
#7 cage::(anonymous namespace)::ArchivesCache::getOrCreate(cage::detail::StringBase<1019u> const&, cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>) <null> (libcage-core.so+0xf26aa)
#8 cage::(anonymous namespace)::archiveFindIterate(std::shared_ptr<cage::ArchiveAbstract>, cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf2b0a)
#9 cage::(anonymous namespace)::archiveFindIterate(std::shared_ptr<cage::ArchiveAbstract>, cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf2dc5)
#10 cage::archiveFindTowardsRoot(cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf1ddd)
#11 cage::newFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0xeefd6)
#12 cage::writeFile(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xef21f)
#13 cage::Delegate<void (unsigned int, unsigned int)>& cage::Delegate<void (unsigned int, unsigned int)>::bind<(anonymous namespace)::ConcurrentTester<1u>, &((anonymous namespace)::ConcurrentTester<1u>::threadEntry(unsigned int, unsigned int))>((anonymous namespace)::ConcurrentTester<1u>*)::'lambda'(void*, unsigned int, unsigned int)::__invoke(void*, unsigned int, unsigned int) <null> (cage-test-core+0x4d76fe)
#14 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<cage::(anonymous namespace)::ThreadPoolImpl, &(cage::(anonymous namespace)::ThreadPoolImpl::threadEntryLocal())>(cage::(anonymous namespace)::ThreadPoolImpl*)::'lambda'(void*)::__invoke(void*) <null> (libcage-core.so+0x219ea1)
#15 cage::(anonymous namespace)::threadFunctionImpl(void*) <null> (libcage-core.so+0xca660)
Location is heap block of size 1216 at 0x7b6400040600 allocated by thread T15:
#0 aligned_alloc <null> (cage-test-core+0x437dd0)
#1 void* cage::privat::MemoryArenaStub::allocate<cage::(anonymous namespace)::SystemMemoryArenaImpl>(void*, unsigned long, unsigned long) <null> (libcage-core.so+0x179fdf)
#2 cage::MemoryArena::allocate(unsigned long, unsigned long) <null> (libcage-core.so+0x179b69)
#3 cage::realNewFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0xfbc7e)
#4 cage::(anonymous namespace)::ArchiveReal::openFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0xfdf2a)
#5 cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>& cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>::bind<cage::ArchiveAbstract*, &(cage::(anonymous namespace)::archiveCtorArchive(cage::ArchiveAbstract*, cage::detail::StringBase<1019u> const&))>(cage::ArchiveAbstract*)::'lambda'(void*, cage::detail::StringBase<1019u> const&)::__invoke(void*, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xf372e)
#6 cage::(anonymous namespace)::ArchivesCache::getOrCreate(cage::detail::StringBase<1019u> const&, cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>) <null> (libcage-core.so+0xf26aa)
#7 cage::(anonymous namespace)::archiveFindIterate(std::shared_ptr<cage::ArchiveAbstract>, cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf2b0a)
#8 cage::archiveFindTowardsRoot(cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf1ddd)
#9 cage::pathRemove(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xf0510)
#10 cage::Delegate<void (unsigned int, unsigned int)>& cage::Delegate<void (unsigned int, unsigned int)>::bind<(anonymous namespace)::ConcurrentTester<1u>, &((anonymous namespace)::ConcurrentTester<1u>::threadEntry(unsigned int, unsigned int))>((anonymous namespace)::ConcurrentTester<1u>*)::'lambda'(void*, unsigned int, unsigned int)::__invoke(void*, unsigned int, unsigned int) <null> (cage-test-core+0x4d764b)
#11 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<cage::(anonymous namespace)::ThreadPoolImpl, &(cage::(anonymous namespace)::ThreadPoolImpl::threadEntryLocal())>(cage::(anonymous namespace)::ThreadPoolImpl*)::'lambda'(void*)::__invoke(void*) <null> (libcage-core.so+0x219ea1)
#12 cage::(anonymous namespace)::threadFunctionImpl(void*) <null> (libcage-core.so+0xca660)
Mutex M476109511447343056 is already destroyed.
Mutex M677927069748822688 is already destroyed.
Mutex M678771494678954976 is already destroyed.
Mutex M473857711633617008 is already destroyed.
Thread T15 'tester_2' (tid=10220, running) created by main thread at:
#0 pthread_create <null> (cage-test-core+0x43867b)
#1 cage::newThread(cage::Delegate<void ()>, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xc9cc9)
#2 cage::newThreadPool(cage::detail::StringBase<1019u> const&, unsigned int) <null> (libcage-core.so+0x219aea)
#3 testArchivesRecursion() <null> (cage-test-core+0x4d59e7)
#4 main <null> (cage-test-core+0x579539)
Thread T22 'tester_0' (tid=10218, running) created by main thread at:
#0 pthread_create <null> (cage-test-core+0x43867b)
#1 cage::newThread(cage::Delegate<void ()>, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xc9cc9)
#2 cage::newThreadPool(cage::detail::StringBase<1019u> const&, unsigned int) <null> (libcage-core.so+0x219aea)
#3 testArchivesRecursion() <null> (cage-test-core+0x4d59e7)
#4 main <null> (cage-test-core+0x579539)
SUMMARY: ThreadSanitizer: data race (/home/runner/work/cage/cage/build/result/release/libcage-core.so+0xfd4e5) in cage::(anonymous namespace)::FileReal::reopenForModification()
==================
==================
WARNING: ThreadSanitizer: data race (pid=10124)
Read of size 4 at 0x7b6400040a80 by thread T22 (mutexes: write M480894586051404048):
#0 cage::FileAbstract::mode() const <null> (libcage-core.so+0xf17fd)
#1 cage::(anonymous namespace)::FileZip::reopenForModificationInternal() <null> (libcage-core.so+0x103846)
#2 cage::(anonymous namespace)::FileZip::reopenForModification() <null> (libcage-core.so+0x103385)
#3 cage::(anonymous namespace)::ArchiveZip::openFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0x10065f)
#4 cage::newFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0xeeff9)
#5 cage::writeFile(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xef21f)
#6 cage::Delegate<void (unsigned int, unsigned int)>& cage::Delegate<void (unsigned int, unsigned int)>::bind<(anonymous namespace)::ConcurrentTester<1u>, &((anonymous namespace)::ConcurrentTester<1u>::threadEntry(unsigned int, unsigned int))>((anonymous namespace)::ConcurrentTester<1u>*)::'lambda'(void*, unsigned int, unsigned int)::__invoke(void*, unsigned int, unsigned int) <null> (cage-test-core+0x4d76fe)
#7 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<cage::(anonymous namespace)::ThreadPoolImpl, &(cage::(anonymous namespace)::ThreadPoolImpl::threadEntryLocal())>(cage::(anonymous namespace)::ThreadPoolImpl*)::'lambda'(void*)::__invoke(void*) <null> (libcage-core.so+0x219ea1)
#8 cage::(anonymous namespace)::threadFunctionImpl(void*) <null> (libcage-core.so+0xca660)
Previous write of size 1 at 0x7b6400040a81 by thread T15 (mutexes: write M476109511447343056):
#0 cage::(anonymous namespace)::FileReal::reopenForModification() <null> (libcage-core.so+0xfd486)
#1 cage::(anonymous namespace)::FileZip::reopenForModificationInternal() <null> (libcage-core.so+0x103869)
#2 cage::(anonymous namespace)::FileZip::reopenForModification() <null> (libcage-core.so+0x103385)
#3 cage::(anonymous namespace)::ArchiveZip::remove(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0x100108)
#4 cage::pathRemove(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xf052d)
#5 cage::Delegate<void (unsigned int, unsigned int)>& cage::Delegate<void (unsigned int, unsigned int)>::bind<(anonymous namespace)::ConcurrentTester<1u>, &((anonymous namespace)::ConcurrentTester<1u>::threadEntry(unsigned int, unsigned int))>((anonymous namespace)::ConcurrentTester<1u>*)::'lambda'(void*, unsigned int, unsigned int)::__invoke(void*, unsigned int, unsigned int) <null> (cage-test-core+0x4d764b)
#6 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<cage::(anonymous namespace)::ThreadPoolImpl, &(cage::(anonymous namespace)::ThreadPoolImpl::threadEntryLocal())>(cage::(anonymous namespace)::ThreadPoolImpl*)::'lambda'(void*)::__invoke(void*) <null> (libcage-core.so+0x219ea1)
#7 cage::(anonymous namespace)::threadFunctionImpl(void*) <null> (libcage-core.so+0xca660)
Location is heap block of size 1216 at 0x7b6400040600 allocated by thread T15:
#0 aligned_alloc <null> (cage-test-core+0x437dd0)
#1 void* cage::privat::MemoryArenaStub::allocate<cage::(anonymous namespace)::SystemMemoryArenaImpl>(void*, unsigned long, unsigned long) <null> (libcage-core.so+0x179fdf)
#2 cage::MemoryArena::allocate(unsigned long, unsigned long) <null> (libcage-core.so+0x179b69)
#3 cage::realNewFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0xfbc7e)
#4 cage::(anonymous namespace)::ArchiveReal::openFile(cage::detail::StringBase<1019u> const&, cage::FileMode const&) <null> (libcage-core.so+0xfdf2a)
#5 cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>& cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>::bind<cage::ArchiveAbstract*, &(cage::(anonymous namespace)::archiveCtorArchive(cage::ArchiveAbstract*, cage::detail::StringBase<1019u> const&))>(cage::ArchiveAbstract*)::'lambda'(void*, cage::detail::StringBase<1019u> const&)::__invoke(void*, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xf372e)
#6 cage::(anonymous namespace)::ArchivesCache::getOrCreate(cage::detail::StringBase<1019u> const&, cage::Delegate<std::shared_ptr<cage::ArchiveAbstract> (cage::detail::StringBase<1019u> const&)>) <null> (libcage-core.so+0xf26aa)
#7 cage::(anonymous namespace)::archiveFindIterate(std::shared_ptr<cage::ArchiveAbstract>, cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf2b0a)
#8 cage::archiveFindTowardsRoot(cage::detail::StringBase<1019u> const&, cage::ArchiveFindModeEnum) <null> (libcage-core.so+0xf1ddd)
#9 cage::pathRemove(cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xf0510)
#10 cage::Delegate<void (unsigned int, unsigned int)>& cage::Delegate<void (unsigned int, unsigned int)>::bind<(anonymous namespace)::ConcurrentTester<1u>, &((anonymous namespace)::ConcurrentTester<1u>::threadEntry(unsigned int, unsigned int))>((anonymous namespace)::ConcurrentTester<1u>*)::'lambda'(void*, unsigned int, unsigned int)::__invoke(void*, unsigned int, unsigned int) <null> (cage-test-core+0x4d764b)
#11 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<cage::(anonymous namespace)::ThreadPoolImpl, &(cage::(anonymous namespace)::ThreadPoolImpl::threadEntryLocal())>(cage::(anonymous namespace)::ThreadPoolImpl*)::'lambda'(void*)::__invoke(void*) <null> (libcage-core.so+0x219ea1)
#12 cage::(anonymous namespace)::threadFunctionImpl(void*) <null> (libcage-core.so+0xca660)
Mutex M480894586051404048 is already destroyed.
Mutex M476109511447343056 is already destroyed.
Thread T22 'tester_0' (tid=10218, running) created by main thread at:
#0 pthread_create <null> (cage-test-core+0x43867b)
#1 cage::newThread(cage::Delegate<void ()>, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xc9cc9)
#2 cage::newThreadPool(cage::detail::StringBase<1019u> const&, unsigned int) <null> (libcage-core.so+0x219aea)
#3 testArchivesRecursion() <null> (cage-test-core+0x4d59e7)
#4 main <null> (cage-test-core+0x579539)
Thread T15 'tester_2' (tid=10220, running) created by main thread at:
#0 pthread_create <null> (cage-test-core+0x43867b)
#1 cage::newThread(cage::Delegate<void ()>, cage::detail::StringBase<1019u> const&) <null> (libcage-core.so+0xc9cc9)
#2 cage::newThreadPool(cage::detail::StringBase<1019u> const&, unsigned int) <null> (libcage-core.so+0x219aea)
#3 testArchivesRecursion() <null> (cage-test-core+0x4d59e7)
#4 main <null> (cage-test-core+0x579539)
SUMMARY: ThreadSanitizer: data race (/home/runner/work/cage/cage/build/result/release/libcage-core.so+0xf17fd) in cage::FileAbstract::mode() const
==================
currently tooltips are hidden behind expanded combo box list
make it possible to have different tooltips for individual items in the combo box done
add pathCopy function
make pathCopy and pathMove work with both files and folders
document behavior when the destination already exists
tests
Hello, what version of compiler and standard of c++ you use for compile cage on Linux?
/home/max/projects/game-engines/cage/sources/libcore/network/ginnel.cpp: In function ‘constexpr cage::FlatSet<short unsigned int> cage::{anonymous}::decodeAck(cage::uint16, cage::uint32)’:
/home/max/projects/game-engines/cage/sources/libcore/network/ginnel.cpp:201:41: error: variable ‘result’ of non-literal type ‘cage::FlatSet<short unsigned int>’ in ‘constexpr’ function
201 | FlatSet<uint16> result
I use gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
https://en.cppreference.com/w/cpp/language/constexpr
A constexpr variable must satisfy the following requirements:
it is not of class type nor (possibly multi-dimensional) array thereof, ... (BUT (since C++20))
possible solution:
tasks are executed in FIFO order, irrespective of priorities
but lower-priority tasks are skipped in threads that are running higher priority task
and set asset decompression tasks to lower priority
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.