由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 丰田的自动加速是因为ECM代码写的太烂了 (转载)
相关主题
丰田工程师真的该枪毙啊 (转载)嵌入式怎么才能入门
DHCP server苹果的OS X为什么从Mach内核转用BSD内核?
怎样高效管理内存?丰田在嵌入式系统里用递归
(ZT) 怎样学习RTOS?多线程程序有什么好的调式方法?
btw, MS C++ 是ECMA-372标准Scala 1-star, would not program again
为啥大家都比较python的web framework呢中国航天SpaceOS操作系统
C++是给神仙用的语言Paypal抛弃Java是因为Douglas Crockford吗?
建议大家介绍自己日常的编程任务,工具,如何选择为什么Java在内置系统里争不过C++?
相关话题的讨论汇总
话题: misra话题: toyota话题: 丰田话题: 规范话题: barr
进入Programming版参与讨论
1 (共1页)
n**********2
发帖数: 648
1
【 以下文字转载自 Automobile 讨论区 】
发信人: chauncey (ag), 信区: Automobile
标 题: 丰田的自动加速是因为ECM代码写的太烂了
发信站: BBS 未名空间站 (Sun Apr 26 11:27:39 2015, 美东)
http://www.edn.com/design/automotive/4423428/Toyota-s-killer-fi
https://news.ycombinator.com/item?id=9440094
>> The Camry ETCS code was found to have 11,000 global variables. Barr
described the code as “spaghetti.” Using the Cyclomatic Complexity metric,
67 functions were rated untestable (meaning they scored more than 50). The
throttle angle function scored more than 100 (unmaintainable).
代码里有11,000个全局变量,67个函数被认为是根本没法测试的因为代码太乱了。油门
角度的函数被认为是没法维护的
>> Toyota loosely followed the widely adopted MISRA-C coding rules but Barr
’s group found 80,000 rule violations. Toyota's own internal standards make
use of only 11 MISRA-C rules, and five of those were violated in the actual
code. MISRA-C:1998, in effect when the code was originally written, has 93
required and 34 advisory rules. Toyota nailed six of them.
丰田违反了80,000次编程规范。丰田自己的内部标准只采用了11项MISRA-C规范,这其
中5项在实际编程中被违反。MISRA-C应该是有93项必须的规范和34条建议规范。丰田只
符合了6项规范
Stack overflow. Toyota claimed only 41% of the allocated stack space was
being used. Barr's investigation showed that 94% was closer to the truth. On
top of that, stack-killing, MISRA-C rule-violating recursion was found in
the code, and the CPU doesn't incorporate memory protection to guard against
stack overflow.
丰田宣称只用了41%的栈空间,但是调查发现实际使用了94%,而且没有任何栈溢出的保
护(栈溢出会毁坏数据使得程序的运行变得不可预料)
Toyota's ETCS used a version of OSEK, which is an automotive standard RTOS
API. For some reason, though, the CPU vendor-supplied version was not
certified compliant.
Unintentional RTOS task shutdown was heavily investigated as a potential
source of the UA. As single bits in memory control each task, corruption due
to HW or SW faults will suspend needed tasks or start unwanted ones.
Vehicle tests confirmed that one particular dead task would result in loss
of throttle control, and that the driver might have to fully remove their
foot from the brake during an unintended acceleration event before being
able to end the unwanted acceleration.
丰田的CPU用的是没有经过认证的。由于硬件或软件造成的内存数据毁坏由此导致需要
的任务被关闭或者启动不需要的任务被认为是造成自动加速的潜在原因。测试确认一个
特定的被关闭的任务会导致失去油门控制
我不下任何结论,只说事实。
b*******s
发帖数: 5216
2
skill set issue of embedded system engineers
1 (共1页)
进入Programming版参与讨论
相关主题
为什么Java在内置系统里争不过C++?btw, MS C++ 是ECMA-372标准
c++就像一个贼船为啥大家都比较python的web framework呢
为什么MITBBS至今都未实现Web 2.0 和SNS?C++是给神仙用的语言
谁能示范一个小的C程序建议大家介绍自己日常的编程任务,工具,如何选择
丰田工程师真的该枪毙啊 (转载)嵌入式怎么才能入门
DHCP server苹果的OS X为什么从Mach内核转用BSD内核?
怎样高效管理内存?丰田在嵌入式系统里用递归
(ZT) 怎样学习RTOS?多线程程序有什么好的调式方法?
相关话题的讨论汇总
话题: misra话题: toyota话题: 丰田话题: 规范话题: barr