Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Thomas Hallgren <thomas@datawire.io>
To: wireguard@lists.zx2c4.com
Subject: Incompatibility between wintun.dll and go module
Date: Fri, 27 May 2022 16:09:02 +0200	[thread overview]
Message-ID: <CAGyv=Qv7vNrTvMriOxAyEHHUAz6qOOZDtjfj=+ru+yOKAcY8UQ@mail.gmail.com> (raw)

Hi,

We're using the wintun.dll and the go module
golang.zx2c4.com/wireguard/windows v0.5.3 in our product. The dll
initialization fails when upgrading the wintun.dll to version 0.14.1
(or 0.14, it doesn't matter). 0.13 works fine. Relevant stack trace
below.

Thanks for an excellent library. Without it, it would be much harder
to port our product to Windows.

unexpected fault address 0xffffffffffffffff
fatal error: fault
[signal 0xc0000005 code=0x0 addr=0xffffffffffffffff pc=0xe8b29d]

goroutine 65 [running, locked to thread]:
runtime.throw({0x27b93d9?, 0x0?})
runtime/panic.go:992 +0x76 fp=0xc000a393d8 sp=0xc000a393a8 pc=0xce8996
runtime.sigpanic()
runtime/signal_windows.go:261 +0x125 fp=0xc000a39420 sp=0xc000a393d8 pc=0xcfbb05
golang.org/x/sys/windows.UTF16PtrToString(0x240e6a0?)
golang.org/x/sys@v0.0.0-20220209214540-3681064d5158/windows/syscall_windows.go:132
+0x1d fp=0xc000a39468 sp=0xc000a39420 pc=0xe8b29d
golang.zx2c4.com/wireguard/tun/wintun.setupLogger.func1(0xc000057590?, 0x0?)
golang.zx2c4.com/wireguard@v0.0.0-20210427022245-097af6e1351b/tun/wintun/wintun_windows.go:53
+0x1c fp=0xc000a394b0 sp=0xc000a39468 pc=0x1f321bc
runtime.call16(0x0, 0x28df468, 0xc000a39538, 0x0, 0x0, 0x10, 0xc000a39790)
runtime/asm_amd64.s:701 +0x50 fp=0xc000a394d0 sp=0xc000a394b0 pc=0xd14530
runtime.callbackWrap(0x7c95ffebc0)
runtime/syscall_windows.go:378 +0x134 fp=0xc000a398b0 sp=0xc000a394d0
pc=0xd04074
runtime.cgocallbackg1(0xd03f40, 0x0?, 0x0)
runtime/cgocall.go:314 +0x2ca fp=0xc000a39980 sp=0xc000a398b0 pc=0xcb4b8a
runtime.cgocallbackg(0xc000583380?, 0x300000002?, 0xc000583380?)
runtime/cgocall.go:233 +0x106 fp=0xc000a39a18 sp=0xc000a39980 pc=0xcb47c6
runtime.cgocallbackg(0xd03f40, 0x7c95ffebc0, 0x0)
<autogenerated>:1 +0x36 fp=0xc000a39a40 sp=0xc000a39a18 pc=0xd18356
runtime.cgocallback(0xcb464b, 0xd17be0, 0xc0001002c0)
runtime/asm_amd64.s:971 +0xd7 fp=0xc000a39a68 sp=0xc000a39a40 pc=0xd160f7
runtime.systemstack_switch()
runtime/asm_amd64.s:436 fp=0xc000a39a70 sp=0xc000a39a68 pc=0xd13fe0
runtime.cgocall(0xd17be0, 0xc0001002c0)
runtime/cgocall.go:167 +0xab fp=0xc000a39aa8 sp=0xc000a39a70 pc=0xcb464b
syscall.SyscallN(0x7ffc169c3a90?, {0xc000a39b40?, 0x3?, 0x0?})
runtime/syscall_windows.go:538 +0x109 fp=0xc000a39b20 sp=0xc000a39aa8
pc=0xd12de9
syscall.Syscall(0xc000479590?, 0x1a428c8510a?, 0x1a428c8510a?, 0x0?, 0x0?)
runtime/syscall_windows.go:476 +0x3b fp=0xc000a39b68 sp=0xc000a39b20 pc=0xd129fb
golang.zx2c4.com/wireguard/tun/wintun.(*Pool).OpenAdapter(0xc000187800,
{0x27b825c?, 0x1a403910598?})
golang.zx2c4.com/wireguard@v0.0.0-20210427022245-097af6e1351b/tun/wintun/wintun_windows.go:89
+0xad fp=0xc000a39bd8 sp=0xc000a39b68 pc=0x1f3256d
golang.zx2c4.com/wireguard/tun.CreateTUNWithRequestedGUID({0x27b825c,
0x4}, 0x0?, 0x0)
golang.zx2c4.com/wireguard@v0.0.0-20210427022245-097af6e1351b/tun/tun_windows.go:75
+0x4d fp=0xc000a39c50 sp=0xc000a39bd8 pc=0x1f3384d
golang.zx2c4.com/wireguard/tun.CreateTUN(...)
golang.zx2c4.com/wireguard@v0.0.0-20210427022245-097af6e1351b/tun/tun_windows.go:63

             reply	other threads:[~2022-06-14  9:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-27 14:09 Thomas Hallgren [this message]
2022-06-14 17:02 ` Simon Rozman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGyv=Qv7vNrTvMriOxAyEHHUAz6qOOZDtjfj=+ru+yOKAcY8UQ@mail.gmail.com' \
    --to=thomas@datawire.io \
    --cc=wireguard@lists.zx2c4.com \
    --subject='Re: Incompatibility between wintun.dll and go module' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).