diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2001-08-01 22:58:36 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2001-08-01 22:58:36 +0000 |
commit | fab8d075109f2475f4423aed5743dd4c9635e6a9 (patch) | |
tree | 1b14d7e32baac4e52b27bfbb6dc5a9727f7d1c4b | |
parent | 92eb309c49f5f1371f685fe3efca2c86d81c72df (diff) | |
download | ATCD-fab8d075109f2475f4423aed5743dd4c9635e6a9.tar.gz |
ChangeLogTag:Wed Aug 1 15:57:35 2001 Ossama Othman <ossama@uci.edu>
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 11 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 11 | ||||
-rw-r--r-- | ace/Message_Block.cpp | 28 |
4 files changed, 52 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog index 9f4330e01c7..7fc95d97fe1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Wed Aug 1 15:57:35 2001 Ossama Othman <ossama@uci.edu> + + * ace/Message_Block.cpp (release, release_i): + + Obtain the pointer to the allocator from the object that will be + destroyed before calling ACE_DES_FREE on the object. Previously + we were obtaining the allocator after the object was destroyed, + due to the way the ACE_DES_FREE macro works. Thanks to Hyman + Rosen <hyrosen@mail.com> for reporting the problem, and to + Carlos for suggesting a fix. [Bug 992] + Wed Aug 1 15:00:21 2001 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu> * ace/Log_Record.{h,i}: Changed msg_data_len() from a "setter" diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index 9f4330e01c7..7fc95d97fe1 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,14 @@ +Wed Aug 1 15:57:35 2001 Ossama Othman <ossama@uci.edu> + + * ace/Message_Block.cpp (release, release_i): + + Obtain the pointer to the allocator from the object that will be + destroyed before calling ACE_DES_FREE on the object. Previously + we were obtaining the allocator after the object was destroyed, + due to the way the ACE_DES_FREE macro works. Thanks to Hyman + Rosen <hyrosen@mail.com> for reporting the problem, and to + Carlos for suggesting a fix. [Bug 992] + Wed Aug 1 15:00:21 2001 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu> * ace/Log_Record.{h,i}: Changed msg_data_len() from a "setter" diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 9f4330e01c7..7fc95d97fe1 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,14 @@ +Wed Aug 1 15:57:35 2001 Ossama Othman <ossama@uci.edu> + + * ace/Message_Block.cpp (release, release_i): + + Obtain the pointer to the allocator from the object that will be + destroyed before calling ACE_DES_FREE on the object. Previously + we were obtaining the allocator after the object was destroyed, + due to the way the ACE_DES_FREE macro works. Thanks to Hyman + Rosen <hyrosen@mail.com> for reporting the problem, and to + Carlos for suggesting a fix. [Bug 992] + Wed Aug 1 15:00:21 2001 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu> * ace/Log_Record.{h,i}: Changed msg_data_len() from a "setter" diff --git a/ace/Message_Block.cpp b/ace/Message_Block.cpp index 335004f9768..67f2470fbae 100644 --- a/ace/Message_Block.cpp +++ b/ace/Message_Block.cpp @@ -802,9 +802,13 @@ ACE_Message_Block::release (void) destroy_dblock = this->release_i (0); if (destroy_dblock != 0) - ACE_DES_FREE (tmp, - tmp->data_block_allocator ()->free, - ACE_Data_Block); + { + ACE_Allocator *allocator = tmp->data_block_allocator (); + ACE_DES_FREE (tmp, + allocator->free, + ACE_Data_Block); + } + return 0; } @@ -827,9 +831,12 @@ ACE_Message_Block::release_i (ACE_Lock *lock) ACE_Data_Block *db = tmp->data_block (); if (tmp->release_i (lock) != 0) - ACE_DES_FREE (db, - db->data_block_allocator ()->free, - ACE_Data_Block); + { + ACE_Allocator *allocator = db->data_block_allocator (); + ACE_DES_FREE (db, + allocator->free, + ACE_Data_Block); + } } while (mb); @@ -852,9 +859,12 @@ ACE_Message_Block::release_i (ACE_Lock *lock) if (this->message_block_allocator_ == 0) delete this; else - ACE_DES_FREE (this, - message_block_allocator_->free, - ACE_Message_Block); + { + ACE_Allocator *allocator = this->message_block_allocator_; + ACE_DES_FREE (this, + allocator->free, + ACE_Message_Block); + } return result; } |