Number of Illegally dereferenced pointer on version R2020b is decreased significantly?
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I'm comparing between version R2019b and R2020b when run same source code. Please take a look two shoots below:
- Source 780B
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/554622/image.png)
- Source 800B
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/554627/image.png)
Run 780B*: Number of Illegally dereferenced pointer on version R2020b is decreased to 264
Run 800B: Illegally dereferenced pointer on version R2020b is decreased to 237
Please let me know why Number of Illegally dereferenced pointer on version R2020b is decreased significantly?
Should we apply version R2020b?
BR
Thang Tran
Risposte (1)
Anirban
il 19 Mar 2021
Hi,
I assume you are using the exact same Polyspace project (with exact same configuration) in both versions. Can you check something real quick? Assuming that you are using the desktop products, on the Dashboard pane for a project, you can see the percentage of code covered by the verification. See more details in Dashboard. Can you check if the coverage is the same in both versions?
10 Commenti
Anirban
il 30 Apr 2021
Hi,
In both releases, the message states that the pointer is not null. So that is not the difference.
An Illegally dereferenced pointer check consists of several checks:
- Whether the pointer is NULL.
- Whether the pointer points to a region that is ok to dereference.
It's the second check where R2019a and R2020b seems to differ. An interesting difference I notice is that in R2019a, the message states these things:
- Pointer may point to dynamically allocated memory. Is the pointer really pointing to dynamically allocated memory? Or, maybe Polyspace thinks it is doing that because of some overapproximation? And maybe Polyspace is more precise in R202b?
- Pointer points to some local variable in a function and is accessed outside the function. Again, this might be an overapproximation, that became more precise in R2020b.
I hope you were able to contact Support, and get a detailed investigation on your project.
Vedere anche
Categorie
Scopri di più su Multitasking in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!