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

조회 수: 1 (최근 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