[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Data directory and libraries to preload

From: Vadim Zeitlin
Subject: Re: [lmi] Data directory and libraries to preload
Date: Fri, 3 Jun 2016 16:33:39 +0200

On Tue, 31 May 2016 22:55:38 +0000 Greg Chicares <address@hidden> wrote:

GC> On 2016-05-31 20:41, Vadim Zeitlin wrote:
GC> > I don't think it's really necessary to preload
GC> > these DLLs so early, surely we could do this in Skeleton::OnInit() after
GC> > parsing the command line options, couldn't we?
GC> Sounds good. The whole point of preloading DLLs is to prevent them
GC> from blithely smashing the FP control word. In theory at least,
GC> parsing the command line doesn't involve floating point.
GC> Since you've figured this out, would you mind proposing a patch?

 Here is the minimal patch: https://github.com/vadz/lmi/pull/35
I've tested it by loading some arbitrary DLL and getting the expected
message about being able to remove it from the preloaded DLLs list as it
didn't change the FP control word. I couldn't find any existing DLL that
did change it, and while I could write my own badly-behaved DLL doing this,
I didn't think it was worth it, please let me know if you'd still like me
to do it (the rationale is that a really evil DLL could be changing the
control word from a timer running in a background thread anyhow, so there
is really no way to protect against it).

 I also thought about implementing the updated "TODO" comment and giving an
error if configuration_filepath() is called before parsing the command
line and thus removing this defect marker, but I wasn't sure if I should be
doing this so, again, I'd prefer to ask you to let me know if you think it
should be done.

 Thanks in advance,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]