null pointer is dereferenced

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

null pointer is dereferenced

588 Views
ayaserry
Contributor I

If an uninitialized pointer or initialized by null pointer is dereferenced, the simulator will continue the execution without firing an error. Is there an option to fire error or crash while trying to execute the line of the dereferencing? 

 

Details: - CodeWarrior HCS12 V4.7- Compiler: chc12 compiler - Linker: linker.exe  - Simulator: hiwave.exe

Labels (1)
3 Replies

476 Views
TICS_Fiona
NXP Employee
NXP Employee

I found a same question from you in SR#1-3896475401, and it is under processing by our engineer.

Fiona Kuang

Technical Information & Commercial Support

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

476 Views
ayaserry
Contributor I

could you please give me this SR? I can't reach it.

0 Kudos
Reply

476 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

No matter you use commandline or CW IDE, add –WmsgSe5651 as a compiler commandline parameter, this should also do the same functionality.

then CW compiler will produce C5651 error about  Null pointer be not initialized.

Can you try it? how does it work?


Have a great day,
Zhang Jun

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply