Commit 0a9b54f
fix: use signer's own Free() instead of system libc free on Windows
On Windows, ctypes.util.find_library('c') returns msvcrt.dll, but the Go
signer DLL (cross-compiled with MinGW) may use a different C runtime or
statically link its own CRT. Calling msvcrt's free() on memory allocated
by a different CRT's malloc() is undefined behavior (crashes, heap
corruption). Fix by using the signer's own exported Free() function which
is guaranteed to use the matching allocator.
Requires the corresponding lighter-go change that exports the Free function.
Co-Authored-By: Mihail <mlavric64@gmail.com>1 parent 9c304f5 commit 0a9b54f
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
99 | 98 | | |
100 | 99 | | |
101 | 100 | | |
102 | | - | |
103 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| |||
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
177 | 181 | | |
178 | 182 | | |
179 | 183 | | |
| |||
0 commit comments