Coder Social home page Coder Social logo

Comments (4)

spikelin avatar spikelin commented on September 21, 2024

谢谢指出问题。bug1的int和size_t类型转换确实不妥,我们会检查。bug2目前两个指针都只在_serialize_connect_packet内使用,运行不会有问题。不过确实Free之后应该置为NULL比较合理。

from tencentcloud-iot-sdk-embedded-c.

zmqccj avatar zmqccj commented on September 21, 2024

bug1在跑OTAdemo的时候应该会复现,下载时会出现段错误,因为len变量附近的一个指针被改了。第二个bug在自动重连的时候会复现,一方面是重复Free导致程序挂掉,另一方面是,这里Free掉了username和password,怎么重连上呢?你们的SDK真的测试过了么?

from tencentcloud-iot-sdk-embedded-c.

spikelin avatar spikelin commented on September 21, 2024

请问你的运行环境是什么?可有改动过SDK的代码?64位系统在我们ubuntu14.04/16.04都有测试过,并没有出现你所说的问题。
关于bug2,你可以仔细看看代码,username和password在_serialize_connect_packet内使用前都是会重新malloc并赋值的,所以不会有问题。

from tencentcloud-iot-sdk-embedded-c.

zmqccj avatar zmqccj commented on September 21, 2024

我重新看了下,bug2是我们以前改了代码,和你们的SDK不一样了,你们这里是可以的。bug1你们没有复现应该是因为你们的优化选项是-Os,你们可以试下-O0,应该会出现Segmentation fault

from tencentcloud-iot-sdk-embedded-c.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.