Re: Pentium 1.8Ghz / Windows 2000 / Delphi 6 problem
From: Martin Harvey (Demon account) (martin_at_nospam_pergolesi.demon.co.uk)
Date: 10/30/04
- Next message: Nick Gabb: "Re: XP sp2 & Dbase files"
- Previous message: Supply and Demand: "Re: Rotating JPEG images?"
- In reply to: Jamie: "Re: Pentium 1.8Ghz / Windows 2000 / Delphi 6 problem"
- Next in thread: Terry Russell: "Re: Pentium 1.8Ghz / Windows 2000 / Delphi 6 problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 30 Oct 2004 15:26:03 GMT
On Fri, 29 Oct 2004 18:40:43 -0700, Jamie
<jamie_5_not_valid_after_5_Please@charter.net> wrote:
>there are many cases where DLL's that your app is using may have a flaw
>in it.
> all DLL's that have anything to do with your app will get mapped into
>your Application space. video drivers is a good one for this along with
>other things.
*sigh*. There's a distinction you're missing here.
There's a difference between a user mode DLL, and a kernel mode .SYS
User mode DLL's will not affect the control word *across
applications*, even if they're loaded in the context of several
different processes. They may change the control word in the context
of a process, but those changes are necessarily on a process by
process basis, since they're operating in the user mode virtual
machine.
> if there is any change od the FPU control word not being restored in
>any DLL's that your app is using, it does cause problems.
Yes, but only in the app that loads and uses the DLL.
> the FPU control word gets restored to what ever it was when the process
>was created or what ever it was when i left the process last.
> when i say process i mean when the OS switches to another process space.!
No, this is not right for user mode DLL's.
User mode DLL's affect the control word *synchronously* - that means
that you need to call them, or they need to be invoked via a system
hook, or via the entry point.
For drivers, they may well change and forget to restore the FPU
control word, and this may happen in situations where the process
context is *arbitrary*, and it will tend to happen *asynchronously*,
that is, control will be wrested away from your app, and the control
word could be changed at an arbitrary (i.e. interrupt) time.
> this means that any System DLL's
There is no such thing as a "system DLL". It's either a DLL that
happens to come with the OS, and runs in user mode, or it's a .SYS
driver file that runs in kernel mode.
> my W98 Pc had a bad video driver in it once that would cause my app to
>generate a floating point error after i did some graphic work.
> i found this problem after doing lots of debugging on the GDI api's
>and found the FPU word had got changed on one of the GDI calls.
> i updated my drivers and it solved the problem there.
Fine.
> i also started to use the code to make sure the PFU control word was
>set to what i wanted there after to make sure.
If a driver is corrupting the control word, since it gets control
asynchronously from your app at any arbitrary time, this is no
guaranteed to work. If a driver messes up the control word, it is not
possible (in princple at least) to write a fix that will work for all
situations.
MH.
- Next message: Nick Gabb: "Re: XP sp2 & Dbase files"
- Previous message: Supply and Demand: "Re: Rotating JPEG images?"
- In reply to: Jamie: "Re: Pentium 1.8Ghz / Windows 2000 / Delphi 6 problem"
- Next in thread: Terry Russell: "Re: Pentium 1.8Ghz / Windows 2000 / Delphi 6 problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|