Tencent / tquic

A high-performance, lightweight, and cross-platform QUIC library
https://tquic.net/
Other
1.02k stars 82 forks source link

Unable to run the example code for the C API #310

Closed Vaibtan closed 1 month ago

Vaibtan commented 1 month ago

I was trying out the example given in https://github.com/tquic-group/tquic-example-c/tree/main. After makefile compilation, I was getting this memory leak error when running the simple_client executable https://github.com/tquic-group/tquic-example-c/blob/main/simple_client.c . How should I resolve this? img

glime-ai[bot] commented 1 month ago

To resolve the memory leak error you encountered when running the simple_client executable from the TQUIC C example, you can follow these steps:

  1. Check for Updates: Ensure that you are using the latest version of the TQUIC library and the example code. Sometimes, issues are fixed in newer versions.

  2. Review the Code: Carefully review the simple_client.c code for any potential memory management issues. Ensure that all allocated memory is properly freed.

  3. Use Valgrind: Utilize tools like Valgrind to identify the exact location of the memory leak. Valgrind can provide detailed information about memory usage and leaks.

  4. Consult Documentation: Refer to the TQUIC documentation for any known issues or additional guidance on using the C API. The documentation can be found here.

  5. Check GitHub Issues: Look through the GitHub issues for any similar problems reported by other users and potential solutions.

  6. Ask for Help: If the issue persists, consider asking for help on the TQUIC GitHub discussions or issues page. Provide detailed information about the error and the steps you have taken to resolve it.

For more detailed guidance, you can refer to the following sources:

This comment was generated by Glime.

iyangsj commented 1 month ago

@xiaofei0800