Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http_test crashes on mac os x #59

Open
frranck opened this issue Apr 14, 2018 · 1 comment
Open

http_test crashes on mac os x #59

frranck opened this issue Apr 14, 2018 · 1 comment

Comments

@frranck
Copy link
Contributor

frranck commented Apr 14, 2018

pwd

../libretro-common-master/samples/net

franck-mac-book-air:net franck$ make DEBUG=1
cc -I../../include ../../net/net_http.c -c -O0 -g -Wall -pedantic -std=gnu99 -o ../../net/net_http.o
cc -I../../include ../../net/net_compat.c -c -O0 -g -Wall -pedantic -std=gnu99 -o ../../net/net_compat.o
cc -I../../include ../../net/net_socket.c -c -O0 -g -Wall -pedantic -std=gnu99 -o ../../net/net_socket.o
cc -I../../include ../../compat/compat_strl.c -c -O0 -g -Wall -pedantic -std=gnu99 -o ../../compat/compat_strl.o
cc -I../../include ../../encodings/encoding_utf.c -c -O0 -g -Wall -pedantic -std=gnu99 -o ../../encodings/encoding_utf.o
cc -I../../include ../../string/stdstring.c -c -O0 -g -Wall -pedantic -std=gnu99 -o ../../string/stdstring.o
cc -I../../include net_http_test.c -c -O0 -g -Wall -pedantic -std=gnu99 -o net_http_test.o
net_http_test.c:40:25: warning: incompatible pointer types passing 'char [89]'
to parameter of type 'struct http_connection_t *'
[-Wincompatible-pointer-types]
..."http://buildbot.libretro.com/nightly/windows/x86_64/latest/mednafen_psx_libretro.dll.zip");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../include/net/net_http.h:47:55: note: passing argument to parameter 'conn'
here
struct http_t *net_http_new(struct http_connection_t *conn);
^
net_http_test.c:45:25: warning: incompatible pointer types passing 'char [26]'
to parameter of type 'struct http_connection_t *'
[-Wincompatible-pointer-types]
http3 = net_http_new("http://www.wikipedia.org/");
^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../include/net/net_http.h:47:55: note: passing argument to parameter 'conn'
here
struct http_t *net_http_new(struct http_connection_t *conn);
^
2 warnings generated.
cc -I../../include ../../net/net_http.o ../../net/net_compat.o ../../net/net_socket.o ../../compat/compat_strl.o ../../encodings/encoding_utf.o ../../string/stdstring.o net_http_test.o -O0 -g -Wall -pedantic -std=gnu99 -o http_test
cc -I../../include ../../net/net_ifinfo.c -c -O0 -g -Wall -pedantic -std=gnu99 -o ../../net/net_ifinfo.o
cc -I../../include net_ifinfo_test.c -c -O0 -g -Wall -pedantic -std=gnu99 -o net_ifinfo_test.o
cc -I../../include ../../net/net_ifinfo.o net_ifinfo_test.o -O0 -g -Wall -pedantic -std=gnu99 -o net_ifinfo
franck-mac-book-air:net franck$ ./http_test
Segmentation fault: 11
franck-mac-book-air:net franck$ lldb ./http_test
(lldb) target create "./http_test"
Traceback (most recent call last):
File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 52, in
import weakref
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/weakref.py", line 14, in
from _weakref import (
ImportError: cannot import name _remove_dead_weakref
Current executable set to './http_test' (x86_64).
(lldb) run
Process 28269 launched: './http_test' (x86_64)
Process 28269 stopped

  • thread git doesn't really like trailing whitespace, remove it #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
    frame #0: 0x00007fff6aadca76 libsystem_info.dylibsi_addrinfo + 182 libsystem_info.dylibsi_addrinfo:
    -> 0x7fff6aadca76 <+182>: movsbl (%rax), %ecx
    0x7fff6aadca79 <+185>: cmpl $0x0, %ecx
    0x7fff6aadca7c <+188>: jne 0x7fff6aadca8a ; <+202>
    0x7fff6aadca82 <+194>: movq $0x0, -0x20(%rbp)
    Target 0: (http_test) stopped.
    (lldb)
@frranck
Copy link
Contributor Author

frranck commented Apr 14, 2018

Not sure how to fix it ?


  http1 = net_http_new(net_http_connection_new("http://buildbot.libretro.com/nightly/windows/x86_64/latest/mednafen_psx_libretro.dll.zip",
       "GET", ""));

   while (!net_http_update(http1, &pos, &tot))
      printf("%.9lu / %.9lu        \r",pos,tot);

   http3 = net_http_new(net_http_connection_new("http://www.wikipedia.org/",
       "GET", ""));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant