Code Prover warning 'Illegally dereferenced pointer'
Mostrar comentarios más antiguos
While running the code prover i got same Orange warning on many places in the code. For example in the function,
void DD_XYZ_Init( uint32_t addr_mcs_crit_ctrl )
{
( ( *((uint32_t volatile *)((uint32_t)addr_tim_crit_ctrl + ( (uint32_t)((uint32_t)0xf0100000+0x00001024) - (uint32_t)((uint32_t)0xf0100000+0x00001024) ))) ) ) = 0;
}
The Warning that i got,
Illegally dereferenced pointer
Warning: pointer may be outside its bounds
Dereference of expression (pointer to volatile unsigned int 32, size: 32 bits):
Pointer may be null.
Points to 4 bytes at unknown offset in buffer of unknown size, so may be outside bounds.
Pointer may point to dynamically allocated memory.
My Question,
We have given proper range for ‘addr_tim_crit_ctrl’ in constraint specification file, but still getting the warning. What could be the reason?
2 comentarios
Anirban
el 5 de Mayo de 2021
Can you state what you provided as constraint on addr_tim_crit_ctrl ? The input to the function seems to be addr_mcs_crit_ctrl . Is it a typo or is addr_tim_crit_ctrl actually different from addr_mcs_crit_ctrl?
Nideesh Madhu
el 5 de Mayo de 2021
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Get Started with Polyspace Code Prover en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!