An FMWL message indicates that the program wrote to memory that was freed. An FMWL message can also indicate that you referenced memory from a heap that was not allocated. Because Purify instrumented one or more components with minimal instrumentation, it cannot determine the exact location of the error. Instead, Purify performs a late detect scan after every 200 heap operations or if 10 seconds has elapsed between the currently active heap operation and the last heap operation, whichever comes first.
This message can occur when you:
§ Have a dangling pointer to a block of memory that has already been freed (caused by retaining the pointer too long or freeing the memory too soon)
§ Index far off the end of a valid block
§ Use a completely random pointer which happens to fall within a freed block of memory
Notes:
§ Enable late detect scanning in the settings dialog boxes.
§ To help Purify find the exact error location, do any one of the following:
§ Rerun the program using precise instrumentation.
§ In the Advanced tab in the settings dialog boxes, lower the values for Late detect scan counter and Late detect scan interval. Note however that higher values allow your program to run faster.
§ Call one of the Purify API functions: PurifySetLateDetectScanCounter, PurifySetLateDetectScanInterval or PurifyHeapValidate.
§ A large deferred free queue length and threshold increases the chances of catching dangling pointer accesses long after the block has been freed and catching dangling pointer accesses to huge blocks of memory. This provides better error detection for FMWL messages. A smaller deferred free queue length and threshold limits the amount of memory on the deferred free queue, taking up less memory at run time but providing a lower level of error detection.
(C) Copyright IBM Corporation 1992, 2010.