This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CC3220SF:无法在 Linux-x64下启动 SLImageCreator

Guru**** 2560390 points
Other Parts Discussed in Thread: UNIFLASH

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/wi-fi-group/wifi/f/wi-fi-forum/882671/cc3220sf-slimagecreator-cannot-be-started-under-linux-x64

器件型号:CC3220SF
主题中讨论的其他器件:UNIFLASH

您好!

根据安装 uniflash 的路径长度、SLImageCreator 无法启动时出现错误:

$./SLImageCreator
无法打开自/tmp/123456789/uniflash_5.3.0/simplelink/imagecreator/bin/SLImageCreatorw 或存档/tmp/123456789/uniflash_5.3.0/simplelink/imagecreator/bin/SLImageCreatorw.pkg

但是、例如从/tmp/uniflash_5.3.0/simplelink/imagecreator/bin/SLImageCreator 运行可以正常工作。 这是由于 Uniflash 启动序列的 C 代码中存在未初始化的存储器错误。 如果字符串的长度更有可能 /simplelink/imagecreator/bin/SLImageCreator 为6或7模8、因为在这些地址找到零字节的可能性更高。

Uniflash 似乎正在使用系统调用`reADLINK`来确定其安装位置。 但是、readlink 的文档显示:

 readlink()不会将空字节附加到 buf。  

这与 Uniflash 尝试打开的文件名末尾出现的垃圾字节一致。 Valgrind 还清楚地表明该程序中存在严重的缓冲区管理问题:

$ Valgrind ./SLImageCreator 项目列表
=52442=Memcheck,内存错误检测器
=52442==版权(C) 2002-2017和 GNU GPL,作者 Julian Seward 等
=52442==使用 Valgrind-3.15.0和 LibVEX;使用-h 重新运行以获得版权信息
=52442==命令:./SLImageCreator 项目列表
=52442=
=52442==条件跳转或移动取决于未初始化的值
=52442== AT 0x483D1A0:stpcpy (vg_replace_strmem.c:1157)
=52442== x×4030C8:??? (在/tmp/123456789/uniflash_5.3.0/simplelink/imagecreator/bin/SLImageCreator 中)
=52442== x 0x402BD3:??? (在/tmp/123456789/uniflash_5.3.0/simplelink/imagecreator/bin/SLImageCreator 中)
=52442== by 0x48A8BBA:(在 main 下面)(libc-start.c:308)
=52442=
=52442==条件跳转或移动取决于未初始化的值
=52442==位于0x4839DD0:strcpy (vg_replace_strmem.c:513)
=52442== 0x402DF2:??? (在/tmp/123456789/uniflash_5.3.0/simplelink/imagecreator/bin/SLImageCreator 中)
=52442== 0x402DEB:??? (在/tmp/123456789/uniflash_5.3.0/simplelink/imagecreator/bin/SLImageCreator 中)
=52442== by 0x48A8BBA:(在 main 下面)(libc-start.c:308)
=52442=
=52442==条件跳转或移动取决于未初始化的值
=52442==位于0x4839DD0:strcpy (vg_replace_strmem.c:513)
=52442== x×4020A0:??? (在/tmp/123456789/uniflash_5.3.0/simplelink/imagecreator/bin/SLImageCreator 中)
=52442== By 0x4020E8:??? (在/tmp/123456789/uniflash_5.3.0/simplelink/imagecreator/bin/SLImageCreator 中)
=52442== 0x402C3B:??? (在/tmp/123456789/uniflash_5.3.0/simplelink/imagecreator/bin/SLImageCreator 中)
=52442== by 0x48A8BBA:(在 main 下面)(libc-start.c:308)
=52442=

快乐的修复!

谢谢、

Balazs

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Balazs、

    感谢您提供详细信息。 我已将此信息转发给我们的工具团队。

    如果您发现任何其他错误、请告知我们! )

    此致、

    Vince