Hi Matthias,
On Mon, 6 Jul 2020 at 20:49, Matthias Geier <
matthia...@gmail.com> wrote:
> #########################
>
> import _cffi_backend
> ffi = _cffi_backend.FFI()
> lib = ffi.dlopen(None)
> print(lib)
>
> #########################
>
> Running this code crashes the CPython interpreter on Windows 10.
Thanks, I've added some explicit checks. Note that I couldn't
reproduce on my Windows 10 machine, where it ends with a clean OSError
but with a somewhat obscure error message. Maybe the difference is
that I tried with a version compiled on my own, and the automatic
builders make a version that is linked with a different libc. The
error message is formatted with "%s" but in this case the pointer is
NULL. Maybe that causes only some of the versions of libc to crash...
Anyway, I've added a check and complain explicitly now before even
trying to call the Windows LoadLibrary() API.
A bientôt,
Armin.