You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Linux when compiled with -d:danger --passC:-flto running the following example code will crash with Error uncompressing response [PuppyError]:
import puppy
for i in1..1:
let resp =fetch("http://neverssl.com")
Removing the for loop avoids the issue, as does not using either -d:danger or --passC:-flto.
For some reason bodyWrap does not get set properly at line 76 in src/puppy/platforms/linux/platform.nim resulting in an empty string.
The text was updated successfully, but these errors were encountered:
My guess is Nim 1.x where threads are disabled by default. The issue is, when using libcurl, a callback proc is provided to libcurl. This callback is what fills bodyWrap with data as it is received. Since this callback looks like it is not called in any Nim source code, it is probably being removed when -flto is used.
The Nim version was 2.0.2, I should have included that in the original post. Unfortunately not as easy as --threads:on! Thank you for the explanation on how it works.
On Linux when compiled with
-d:danger --passC:-flto
running the following example code will crash withError uncompressing response [PuppyError]
:Removing the for loop avoids the issue, as does not using either
-d:danger
or--passC:-flto
.For some reason
bodyWrap
does not get set properly at line 76 insrc/puppy/platforms/linux/platform.nim
resulting in an empty string.The text was updated successfully, but these errors were encountered: