[Bug 51835] New: Using PInvoke on pcap_findalldevs crashes
https://bugs.winehq.org/show_bug.cgi?id=51835 Bug ID: 51835 Summary: Using PInvoke on pcap_findalldevs crashes Product: Wine Version: 6.18 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: critical Priority: P2 Component: wpcap Assignee: wine-bugs(a)winehq.org Reporter: marc_aurel(a)me.com Distribution: --- Created attachment 70732 --> https://bugs.winehq.org/attachment.cgi?id=70732 End of the log before crash The library in question is https://github.com/ravahn/machina As soon as a c# assembly uses the library and starts capturing on a PCapCaptureSocket, pcap_findalldevs(IntPtr ByRef, System.Text.StringBuilder) is invoked and crashes the program, whereas it works fine on windows. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51835 --- Comment #1 from marc_aurel(a)me.com --- Created attachment 70733 --> https://bugs.winehq.org/attachment.cgi?id=70733 Visual Studio solution -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51835 --- Comment #2 from marc_aurel(a)me.com --- This was in a 64-bet wine prefix with .Net framework 4.8 installed -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51835 marc_aurel(a)me.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marc_aurel(a)me.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51835 marc_aurel(a)me.com changed: What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |ArchLinux -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51835 --- Comment #3 from Hans Leidekker <hans(a)meelstraat.net> --- (In reply to marc_aurel from comment #2)
This was in a 64-bet wine prefix with .Net framework 4.8 installed
I don't see a crash with the patches applied from bug 51818. The test app sets up a filter and then waits for packets in a pcap_next_ex() call just like on Windows. It does find a different interface. pcap_findalldevs() returns the loopback interface on Linux first, on Windows I get a non-loopback interface. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51835 --- Comment #4 from Hans Leidekker <hans(a)meelstraat.net> ---
0580:trace:wpcap:wine_pcap_findalldevs (0x32f424 0x32f260)
There's no wine_pcap_findalldevs in current Wine. Can you try current git Wine with the patches from bug 51818 on top? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51835 --- Comment #5 from marc_aurel(a)me.com --- Sorry, I messed up a bit during testing but I can confirm that on current wine git with the patches from https://bugs.winehq.org/show_bug.cgi?id=51818 PInvoke works fine for wine-mono and native .net on linux -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51835 marc_aurel(a)me.com changed: What |Removed |Added ---------------------------------------------------------------------------- OS|Linux |Mac OS X Version|6.18 |6.0 --- Comment #6 from marc_aurel(a)me.com --- I last tested on wine 6.0 on OS X where your patch also fixed bug 51818, but still crashes in the .net call, so I was led to believe that was the case for linux as well… Since native binaries work just fine in that scenario, is there anything I can do (maybe to how the struct for pcap_if is declared in the library) to make this work? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51835 --- Comment #7 from marc_aurel(a)me.com --- (In reply to Hans Leidekker from comment #4)
0580:trace:wpcap:wine_pcap_findalldevs (0x32f424 0x32f260)
There's no wine_pcap_findalldevs in current Wine. Can you try current git Wine with the patches from bug 51818 on top?
I don’t have a wine_pcap_findalldevs in my 6.0 source either, I guess I need to clean my build directory and recompile -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51835 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4(a)web.de Severity|critical |normal --- Comment #8 from Fabian Maurer <dark.shadow4(a)web.de> --- Not critical. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51835 --- Comment #9 from marc_aurel(a)me.com --- This is most likely a duplicate of bug 51818 as well since it is solved by the same patch (even backported to 6.0) and regresses on wine-git -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51835 marc_aurel(a)me.com changed: What |Removed |Added ---------------------------------------------------------------------------- Version|6.0 |6.18 OS|Mac OS X |Linux -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51835 marc_aurel(a)me.com changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|UNCONFIRMED |RESOLVED --- Comment #10 from marc_aurel(a)me.com --- I'm closing the bug as duplicate *** This bug has been marked as a duplicate of bug 51818 *** -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51835 Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #11 from Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- Closing duplicate. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla