3 ms·
As far as i understood the slides the stack overflow part is only one critical problem. The v850 has 1...256kBytes of RAM. Let's assume 256kBytes of RAM. Then
by nuriaion 13y ago
As far as i understood the slides the stack overflow part is only one critical problem.
The v850 has 1...256kBytes of RAM. Let's assume 256kBytes of RAM. Then lets assume they have a Stack of 16kByte. => There are only 983 Bytes of free stack. Then a function call with 5 Int parameters and 10 Int variables needs around 64Bytes.
=> Only 16 recursive calls are needed to have a stack overflow.
Further because the critical data structure in the os are not secured the os will have no idea that something is wrong.
(In several projects we had to have our critical data 2 times in RAM, once normal and once inverted. In a critical project we even had to do all computations two times, once with the normal data and once with the inverse data. This way you will also find some bit flipps of the ALU, RAM etc.)
edit:
In the slides i found that the stacksize is 4kByte => only 245Bytes are free! So you can't make many recursive calls!