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

From: Eli Zaretskii <[email-masked]>
Date: Mon, 08 Mar 2021 15:26:27 +0200

> From: Pip Cet <[email-masked]>
> Date: Sun, 7 Mar 2021 22:16:58 +0000
> Cc: Eli Zaretskii <[email-masked]>, [email-masked], [email-masked]
> 
> > >> This object might have been GC'ed for some reason and we might be
> > >> looking at the same GC issue I've seen on 32bit wide-int (my guess).
> > >> *If* this is the case the question is: why is the CU GC'ed?
> > >
> > > Why wouldn't it be? I'm trying to follow along here :-)
> >
> > If the CU was GC'ed the eln should have been dlclosed.
> 
> Wait, I thought this was on Windows?

Yes, and...?

> > If that's the
> > case at the next load we should get a fresh handle
> 
> You're assuming
> 1. FreeLibrary() succeeded
> 2. The module's refcount was 1
> 3. The module wasn't pinned.
> 
> If any of these assumptions is violated, the behavior would be
> precisely as observed.

Why would any of the above assumptions be violated?