On Mon, Feb 22, 2021 at 11:09:41AM +0200, Paul Irofti wrote: > > - investigate the commit you mention above. Sadly I cannot > > remember the original case that prompted for the caching code to > > be > > added. > > Sorry I could not reply earlier.
No problem, real-life often takes precedence. > > The caching code was added by me to make libreoffice work with non-toy > spreadsheets. Apparently referencing external cells is done through > exception handling in office suites and this lead to waiting for whole > minutes for libreoffice to load. > > The gcc toolchain has this optimization, but clang one does not. So I added > a simple caching mechanism a few years ago that make this bearable. > > See revision 1.8 of AddressSpace.hpp. Of course it moved in the meantime and > CVS lost all its history. > > https://cvsweb.openbsd.org/src/lib/libunwind/src/Attic/AddressSpace.hpp > In the meantime I made a an committed a fix. The root cause was that the cache isn't thread safe. My change fixes that by making the cache object tread_local: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/gnu/llvm/libunwind/src/UnwindCursor.hpp.diff?r1=1.2&r2=1.3 -Otto
