mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 04:55:44 +00:00
* Keep the session preload loadable when spare static TLS runs out The syscall-dispatch selector pointer in the zram preload used the initial-exec TLS model. That marks the whole libddsession TLS block (about 1.8 KB) as static, so loading it at runtime needs that much spare static TLS. Under proot there is not enough, and every guest program failed with "cannot allocate memory in static TLS block". The default model keeps the same per-thread behaviour without that requirement. * Read the dispatch selector only once a thread has turned dispatch on A thread's first read of the selector can allocate its TLS block when the preload was loaded at runtime. The page-out handler and the prctl wrapper now read it only after some thread in the process enabled syscall user dispatch, so processes that never use it never touch the variable from a signal handler. * Keep the dispatch selector in a thread key so the signal handler never allocates * Bind the selector lookup before the handler can run and refuse to arm dispatch without a selector slot * fix(preload): retry selector key setup after key exhaustion * fix(preload): publish the dispatch selector only after the kernel accepts it