Add option to validate pointer addresses in variable server clients

Added a flag called validate_address to each variable server thread.  When
activated each pointer address will be tested to see if it is in memory
the memory manager is tracking.  If it is then everything proceeds normally.
If it does not, then an error return value is returned for the value of this
variable.

refs #193
This commit is contained in:
Alex Lin
2016-02-25 08:56:04 -06:00
parent 643170c319
commit 543bbc0585
7 changed files with 50 additions and 39 deletions

View File

@ -114,6 +114,15 @@ int var_exit() {
return(0) ;
}
int var_validate_address(int on_off) {
Trick::VariableServerThread * vst ;
vst = get_vst() ;
if (vst != NULL ) {
vst->var_validate_address((bool)on_off) ;
}
return(0) ;
}
int var_debug(int level) {
Trick::VariableServerThread * vst ;
vst = get_vst() ;
@ -142,11 +151,7 @@ int var_binary() {
}
int var_retry_bad_ref() {
Trick::VariableServerThread * vst ;
vst = get_vst() ;
if (vst != NULL ) {
vst->var_retry_bad_ref() ;
}
message_publish(MSG_WARNING,"var_retry_bad_ref has been deprecated\n") ;
return(0) ;
}