alibaba / xquic

XQUIC Library released by Alibaba is a cross-platform implementation of QUIC and HTTP/3 protocol.
Apache License 2.0
1.7k stars 327 forks source link

[Bug]: demo_client segment fault #56

Closed easycoderwei closed 2 years ago

easycoderwei commented 2 years ago

What happened?

segment fault occurs when i use demo_client to test

Steps To Reproduce

according to Usage: demo_client [Options] ./demo_client -a 127.0.0.1 -p 1443 -l d -L pwd/log -U http://t.com/return

Relevant log output

Program received signal SIGSEGV, Segmentation fault. 0x00005555555a563b in xqc_demo_cli_parse_server_addr (url=0x7ffff67c1754 "http://t.com/return", cfg=0x7ffff6740010) at /home/weijx/xquic-main/demo/demo_client.c:1193 1193 memcpy(&cfg->addr, result->ai_addr, result->ai_addrlen); (gdb) bt

0 0x00005555555a563b in xqc_demo_cli_parse_server_addr (url=0x7ffff67c1754 "http://t.com/return", cfg=0x7ffff6740010) at /home/weijx/xquic-main/demo/demo_client.c:1193

1 0x00005555555a5856 in xqc_demo_cli_parse_urls (urls=0x7fffffffe7b1 "http://t.com/return", args=0x7ffff6740010) at /home/weijx/xquic-main/demo/demo_client.c:1229

2 0x00005555555a5d25 in xqc_demo_cli_parse_args (argc=11, argv=0x7fffffffe4b8, args=0x7ffff6740010) at /home/weijx/xquic-main/demo/demo_client.c:1393

3 0x00005555555a7912 in main (argc=11, argv=0x7fffffffe4b8) at /home/weijx/xquic-main/demo/demo_client.c:2132

No response

easycoderwei commented 2 years ago

It's ok to use: ./test_client -a 127.0.0.1 -p 1443 -u https://t.com/return -G looking forward to provide demo's help document.

ruiqizhou commented 2 years ago

ok, demo_client/server is used for interoperability testing as described in PR #47. We will provide detailed instructions on how to use test_client and test_server later.