Number of Illegally dereferenced pointer on version R2020b is decreased significantly?

1 回表示 (過去 30 日間)
Tran Thang
Tran Thang 2021 年 3 月 18 日
コメント済み: Anirban 2021 年 4 月 30 日
I'm comparing between version R2019b and R2020b when run same source code. Please take a look two shoots below:
  • Source 780B
  • Source 800B
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
  1 件のコメント
Rik
Rik 2021 年 3 月 18 日
If you want anyone else to have a shot at answering this question, you will have to provide a lot more explanation. Have a read here and here.

サインインしてコメントする。

回答 (1 件)

Anirban
Anirban 2021 年 3 月 19 日
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 件のコメント
Tran Thang
Tran Thang 2021 年 4 月 28 日
I compared result between R2019a and R2020b. I realized that almost cases, main_random in R2020b and it put pointer NOT NULL to function. => It will become GREEN. Please let me know why occur different?
BR
Thang Tran
Anirban
Anirban 2021 年 4 月 30 日
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.

サインインしてコメントする。

タグ

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by