Subject: Re: bug#46256: [feature/native-comp] AOT eln files ignored if run from build tree

From: Eli Zaretskii <[email-masked]>
Date: Mon, 08 Mar 2021 17:14:32 +0200

> From: Pip Cet <[email-masked]>
> Date: Mon, 8 Mar 2021 14:50:50 +0000
> Cc: Andrea Corallo <[email-masked]>, [email-masked], [email-masked]
> 
> > > No dlclose() on Windows.
> >
> > Why does this matter in this case?  (And I do have dlclose in a
> > standard library that comes with MinGW, btw.  Not that it's relevant.)
> 
> We don't use dlclose() on Windows. FreeLibrary() is documented not to
> unload the library in certain cases, and to return a failure code.

You will need to show how those cases could happen in our scenario,
given the way we call FreeLibrary and other related APIs.  Otherwise,
I don't see how these subtleties are relevant.

> > > FreeLibrary() is documented to behave differently from dlclose()
> >
> > It is?  In what way?
> 
> Libraries can be pinned

We never call the API that could result in a library being pinned,
certainly not in the scenario we are talking about.  At least that's
my reading of the code.  Again, if you can describe the situation
where such pinning could happen, please do.  If that happens, it's
probably a bug, because we have no reason to pin a DLL.

> > Well, how about explaining the details in terms that are simple enough
> > that I could understand and do the testing?
> 
> Excellent idea. I'll try!

Thanks, I will study this later.