Jukka Heinonen jhei@iki.fi writes:
However, I can't see why this would cause a crash because as far as I know, int 0 vector is never called by Wine. It doesn't really matter but I'm just curious... (Perhaps they handle int 0 as a call chain?)
It never gets called, but in order to change the vector with int21/ah=25 the vector must be loaded in %ds:%dx. So when the app tries to restore the previous vector it crashes on the %ds selector load because the code segment containing the vector has been freed.
Anyway, this patch fails to initialize the vectors so any attempt to use them causes a crash. These vectors are not currently used by Wine (except 0x3e) so this is not yet a problem but I would really like to see this patch changed so that those vectors are properly initialized (possibly lazily) at program startup and when new task is created (are they copied from another task or reset to default values?).
Well, the patch is doing a kind of lazy initialisation, since it falls back to the global vector if the task one is 0. We could possibly set the task vector at that point, but it's not clear to me that it would be necessary.