DB2 - Problem description
Problem IC74031 | Status: Closed |
REUSING OF DB2HISTORYDATA STRUCTURE FOR REPEATED DB2HISTORYGETENTRY API CALLS MIGHT PRODUCE UNEXPECTED RESULTS | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
db2HistoryGetEntry has a field pioHistData which takes in a struct of db2HistoryData type. If an application reuses the same db2HistoryData type for consecutive calls to db2HistoryGetEntry, then the API might produce wrong results, or even trap. The problem has to do with a field inside the db2HistoryData called poEventSQLCA. If this field is unset, then internally the db2HistoryGetEntry API will set it up with a dummy for the API to process. At the end of the API it will free the memory of the dummy but not nullify the pointer on the structure. This causes problem to subsequent calls to db2HistoryGetEntry with the same instance of db2HistoryData struct as the pointer is non-NULL and the API tries to dereference it. This problem only happens when using a v97 client to talk to a server in v97 or above. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * user of db2HistoryGetEntry API * **************************************************************** * PROBLEM DESCRIPTION: * * See error description * **************************************************************** * RECOMMENDATION: * * memset the db2HistoryData struct before passing it to * * db2HistoryGetEntry. * **************************************************************** | |
Local Fix: | |
The fix is to memset the db2HistoryData struct every time before calling db2HistoryGetEntry. | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows | |
Solution | |
Fix in v97 fp 4 | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 21.01.2011 28.04.2011 28.04.2011 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP4 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.4 |