PS Code Prover - Tooltip text expand, get fully list

1 view (last 30 days)
Hi all.
I'm investigating Orange findings in PS Code Prover. Within the Non-init. pointer finding,
the tooltip shows me where the pointer may point to. But not all variables/structures are listed.
At the end of the tooltip text "...(total: 8)." is displayed.
Question: How to get the complete list where the pointer may point to? or how to expand the tooltip text?
Can I create a special report where to find this info? - i.e. a developer report does not contain this info.
BR and TY for your help & time.
Thomas

Accepted Answer

Anirban
Anirban on 28 Apr 2021
Edited: Anirban on 28 Apr 2021
Hi,
Unfortunately, as of now, there is no way to see the full list. However, to investigate a Non-initialized pointer finding, you do not need this list (in some sense, you need its complement). You need to know whether it is possible that the pointer is never assigned an address along some path in your code.
An orange non-initialized pointer finding means that there is some path along which the pointer itself is not assigned an address. For instance, a simple case is if the assignment happens inside an if block with no else. If the if condition is not satisfied, the pointer is not initialized. Your investigation will involve finding this path (or maybe there is no such path and the result comes from some approximation Polyspace made. If you determine this is the case, you can add a justification to the result). See more details of tools available in the UI for further investigation in Review and Fix Non-initialized Pointer Checks.
  1 Comment
Thomas
Thomas on 28 Apr 2021
Hi Anirban, TY for your answer.
Also for the hints with the assignment and the approximation ;-).
In our special case, we have a switch-case(>7 cases) with 7(!) same function calls but with different pointer addresses.
The pointer can point to different static const, multiple nested structures and I wanted to identify all of them (to verify against code; we can't debug).
But thanks a lot, I will investigate further and may justify it.
BR
Thomas

Sign in to comment.

More Answers (0)

Products


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!