1. A method in a processor in a data processing system for checking assertions, the method comprising: responsive to detecting a change in data in a memory location, determining by the processor whether metadata for an assertion is associated with the memory location; responsive to the metadata being associated with the memory location, comparing by the processor the data to the assertion; and generating by the processor an error if the assertion is invalid with respect to the data, wherein the processor checks the assertions for validity.