Commit c11245d
authored
CLI: Use
This should be a more reliable look-up, since this will directly report
the path of the currently-executing libjulia.dll.
Without this PR, `LoadLibraryW` depends on the system library search
order. When the top-level executable is adjacent to `libjulia.dll` (as
it is for our binary distribution usually), then that search should be
OK.
However, applications that use Julia as a library can end up searching
the system PATH before making it to the correct `lib/julia` directory,
causing us to load the wrong version of `libjulia.dll`. In many cases,
that extra load is benign due to the stricter separation of
libraries/symbols on Windows - However, in general it's likely to be the
cause of subtle bugs.GetModuleHandleExW to locate libjulia.dll (#54617)1 parent fb0d4a2 commit c11245d
1 file changed
+37
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
128 | 154 | | |
129 | 155 | | |
130 | 156 | | |
| |||
135 | 161 | | |
136 | 162 | | |
137 | 163 | | |
138 | | - | |
139 | 164 | | |
140 | 165 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
149 | 175 | | |
150 | 176 | | |
151 | | - | |
152 | | - | |
| 177 | + | |
| 178 | + | |
153 | 179 | | |
154 | 180 | | |
155 | 181 | | |
| |||
0 commit comments