www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20380] New: std.net.curl: misbehaviour on arch 'arm32v7

https://issues.dlang.org/show_bug.cgi?id=20380

          Issue ID: 20380
           Summary: std.net.curl: misbehaviour on arch 'arm32v7 gnueabihf'
                    (Raspberry/Raspbian/Buster)
           Product: D
           Version: D2
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: schlote vahanus.net

Tried to do this:
'''
import std.net.curl;
import std.stdio;

void main()
{
    auto data = get("https://acme-staging-v02.api.letsencrypt.org/directory");
    writeln(data);
}
'''
Works fine on intel, but crashes on Raspberry:
```
pi raspi4:~/builds $ ./curldownload-gdc 
std.net.curl.HTTPStatusException /usr/lib/gcc/arm-linux-gnueabihf/8/include/d/std/net/curl.d(1050):
HTTP request returned status code 0 ()
----------------
0xb6d29723 pure  safe bool std.exception.enforce!(bool).enforce(bool, lazy
object.Throwable)
        ???:0
0x18fb3 char[] std.net.curl._basicHTTP!(char)._basicHTTP(const(char)[],
const(void)[], std.net.curl.HTTP)
        /usr/lib/gcc/arm-linux-gnueabihf/8/include/d/std/net/curl.d:1050
0x16f63 char[] std.net.curl.get!(std.net.curl.HTTP, char).get(const(char)[],
std.net.curl.HTTP)
        /usr/lib/gcc/arm-linux-gnueabihf/8/include/d/std/net/curl.d:540
0x166ab char[] std.net.curl.get!(std.net.curl.AutoProtocol,
char).get(const(char)[], std.net.curl.AutoProtocol)
        /usr/lib/gcc/arm-linux-gnueabihf/8/include/d/std/net/curl.d:552
0x165d3 _Dmain
        /home/pi/builds/curldownload.d:7
0xb6abc157 ???
        ???:0
0xb6abc453 ???
        ???:0
0xb6abc933 ???
        ???:0
0xb6abc453 ???
        ???:0
0xb6abc643 _d_run_main
        ???:0
0x1658f main
        /usr/lib/gcc/arm-linux-gnueabihf/8/include/d/__entrypoint.di:44
0xb67ef717 __libc_start_main
        /build/glibc-FUvrFr/glibc-2.28/csu/libc-start.c:308
pi raspi4:~/builds $ ./curldownload
std.net.curl.HTTPStatusException /usr/lib/ldc/arm-linux-gnueabihf/include/d/std/net/curl.d(1083):
HTTP request returned status code 0 ()
----------------
exception.d:455 pure  safe bool std.exception.enforce!(bool).enforce(bool, lazy
object.Throwable) [0x24c8b]
curldownload.d:1083 [0x2ccf7]
curldownload.d:562 [0x1f347]
curl.d:574 [0x1ee9f]
curldownload.d:7 [0x1edf3]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int
function(char[][])*).runAll() [0xb6ab1b17]
??:? _d_run_main [0xb6ab18af]
__entrypoint.d:8 [0x32f43]
??:? __libc_start_main [0xb67dc717]
```

Compilers:
gdc 8.3
ldc 1.12.0

--
Nov 10 2019