axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samisa Abeysinghe <>
Subject Re: m_iLibCount in ChannelFactory class
Date Wed, 26 Jan 2005 01:55:11 GMT
Hi Fred,
    I too think that it is not sensible to keep on loading the same DLLs.
    I think this happens due to the problem in Call classes
openConnection() method (mentioned in the other mail), where it is
called for each stub method invocation and keeps on loading the DLLs
each time it is called. If we fix it there, then this would not be a


On Tue, 25 Jan 2005 11:24:52 +0000, Fred Preston <> wrote:
> Hi All,
>      m_iLibCount is used by ChannelFactory to keep a count of how may HTTP
> channel libraries have been loaded.  Since there are only two types of
> channel associated with HTTP transport, it did not seem unreasonable to set
> the limit to 2.  m_iLibCount should only change when LoadChannelLibrary is
> called.  This should only be called by HTTPTransport when a new HTTP DLL or
> HTTP SSL DLL name is passed to the setTransportProperty method in
> HTTPTransport.  This method should only need to be called once or at most
> twice to set/load the DLL associated with unsecure and secure channel
> transports.  If the client/server continually tries to set the name of the
> libraries that deal with the HTTP channel requests, then m_iLibCount will
> indeed max at 2 and no more alterations will be possible.  I have changed
> the code to allow the user to keep on loading the same DLLs as often as
> they require (although what purpose this serves I not entirely sure).
> Regards,
> Fred Preston.
>                      Samisa Abeysinghe
>                      <samisa.abeysinghe        To:       Apache AXIS C Developers
List <>
>            >               cc:
>                                                Subject:  m_iLibCount in ChannelFactory
>                      25/01/05 08:11
>                      Please respond to
>                      "Apache AXIS C
>                      Developers List"
> Hi,
>    m_iLibCount in ChannelFactory class hit the celing value
> ChannelFactory_MaxListSize (which is 2 at the moment) during the first
> call to ChannelFactory::LoadChannelLibrary().
>   Then m_iLibCount stays at 2 and the subsequest calls to
> ChannelFactory::LoadChannelLibrary() tries to access invalid memory on
> line:
> m_pChannel[m_iLibCount] = pChannel; (in other words tries to access
> m_pChannel[2] which is out of array given that array size is 2.
>   I ran into this while running the memory profiler.
>   I think this is a bug.
> I guess we have to correct it by adding an else clause to:
> if( m_iLibCount < ChannelFactory_MaxListSize)
>                {
>                        m_iLibCount++;
>                }
> else
> {
>     m_iLibCount = 0; // hit the celing, next load attempt need to
> reload form start
> }
>    Any comments please.
> Thanks,
> Samisa...

View raw message