You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The way this works in general in Windows is the fs register is supposed to point at the current thread's TEB, which then holds things like thread-local vars. You can see where retrowin32's TEB is set up here, and in particular how it doesn't set anything up per thread:
/// The FS register points at the TEB (thread info), which points at the PEB (process info).
I think the way it should work is that instead whenever we create a thread we allocate a new TEB and set the fs_addr field in the new CPU appropriately. (And probably the place where the initial TEB is set up should use the same thing.)
Pocoman (#43) appears to depend on thread local storage, which is currently stubbed.
I pushed a new thread.exe demonstrating the tls problem in 769053b
Right now it prints
But if you look at the code, the tls values it prints should flip between 1/2 depending on which thread is running.
The text was updated successfully, but these errors were encountered: