A method for evaluating safety of a tracing program involves loading a
byte code in a tracing framework, where the byte code includes
instructions of the tracing program, validating the instructions when
loading the byte code, performing one or more safety checks on the
instructions while performing virtual machine emulation of the
instructions, reporting an error condition and aborting virtual machine
emulation of an unsafe instruction in the instructions when the safety
check(s) detect(s) the unsafe instruction, and completing virtual machine
emulation of a safe instruction in the instructions when the safety
check(s) detect(s) the safe instruction, after aborting virtual machine
emulation of the unsafe instruction.