Unexpected error re-initializing Wintun 0.9.2

Jason A. Donenfeld Jason at zx2c4.com
Thu Dec 17 19:05:40 CET 2020

Hi Brad,

Thanks for the clear bug report and reproducer. I've never actually
seen anybody use the iso646.h operators before in real code... First
time for everything I guess!

It looks like the issue is that on each iteration of that loop, you're
calling LoadLibrary and FreeLibrary. Instead, only call LoadLibrary
once per process. Then you won't face this issue.

I've written a patch, however, to support the pathological library
reloading pattern in that example, though:
This will be part of 0.10.1 or 0.11, whichever comes first. But, I'd
really recommend only calling LoadLibrary once per process, regardless
of that fix.

Thanks again for the report.


More information about the WireGuard mailing list