Code Prover and Bug Finder finding race condition bug problem.
3 views (last 30 days)
Show older comments
Husnu umut Okur on 7 Jan 2023
Commented: Husnu umut Okur on 13 Jan 2023
uint8_ t var_u8;
% Global Variables
uint32_t global_variable = 0;
void increment(uint32_t* i)
In the code above we run bug finder and code prover. After completing the analysis bug finder finds only global_variable++ using task1 and task2 race condition.
Code prover finds same error as an protected variable in orange check for global_variable and also finds same error in inside of increment function. Eventhough code prover finding error it shows error on gs struct but it does not point the variable which inside of gs struct(var_u8, var_16, var_u32). That is not enough to understand for error in which variable. How can i find the exactly error inside of the struct ? Is there any sample of this kind of code ?
Note: I followed documentation for all the configuration. In multitasking, i defined my tasks, interrupts and critical sections.
Anirban on 9 Jan 2023
You can see which structure field is accessed on the Variable Access pane.
For more information, see Variable Access.
Code Verification Polyspace Bug Finder Configure and Run Analysis Complete List of Polyspace Bug Finder Analysis Engine Options Run Settings
Find more on Run Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!