Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.
Strange variable and pointer values in debugger with Insure++
LegacyForum
Posts: 1,664 ✭✭
In running an insure built executable under the debugger when examining things like READ_UNINIT_MEM errors that insure has reported you may notice '0xdeadbeef' Or '0xefbeadde' (depending on whether you're on a big endian or a little endian machine) in hex the registers
This is part of how insure checks for things that are uninitialized when you declare a variable or pointer insure initializes it to the hex value of deadbeef. As long as you later you initialize it then you overwrite the deadbeef and everything's fine but if insure see's it being used and it's still got the deadbeef then it say's this thing is uninitialized and reports it. There is also the possibility that this can now cause the program to crash if it happens to use an uninitialized pointer which insure has now initialized with what amounts to a bad address.
There is also an option you can use to specify a different hex value to use just in case you happen to use deadbeef yourself .
For example
insure++.checking_uninit_pattern feedbabe
Would be another easily recognize hex value to use
This is part of how insure checks for things that are uninitialized when you declare a variable or pointer insure initializes it to the hex value of deadbeef. As long as you later you initialize it then you overwrite the deadbeef and everything's fine but if insure see's it being used and it's still got the deadbeef then it say's this thing is uninitialized and reports it. There is also the possibility that this can now cause the program to crash if it happens to use an uninitialized pointer which insure has now initialized with what amounts to a bad address.
There is also an option you can use to specify a different hex value to use just in case you happen to use deadbeef yourself .
For example
insure++.checking_uninit_pattern feedbabe
Would be another easily recognize hex value to use
0