Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It's unclear why, but in some scenarios the hook would reliably hit a null pointer within the native realCallback() call if the call is made while another is already in progress (even though without Frida that's presumably happening just fine, and they're different cb pointers etc etc). We could use Frida's exclusive scheduling to fix this, but that raises the risk of a deadlock here a bit in, so instead we do a very simple locking setup with a polling unlock. Very quick & rough but works nicely, and allows reentrant locks in a single thread in case some apps use SSL to verify SSL somehow. Hard to imagine a cross-thread deadlock here so hopefully that'll be sufficient...
- Loading branch information