[Ace-users] [ace-users] Memory leak in ACE_Sig_Handlers_Set
Johnny Willemsen
jwillemsen at remedy.nl
Tue Feb 12 07:06:13 CST 2008
Hi,
Thanks for using the PRF form. Can you make a unified patch the resolves the
memory leak for you and then store it in bugzilla
(http://deuce.doc.wustl.edu/bugzilla/index.cgi) pending for integration
Regards,
Johnny Willemsen
Remedy IT
Postbus 101
2650 AC Berkel en Rodenrijs
The Netherlands
www.theaceorb.nl / www.remedy.nl
*** Integrated compile and test statistics see
http://scoreboard.theaceorb.nl ***
*** Commercial service and support for ACE/TAO/CIAO ***
*** See http://www.theaceorb.nl/en/support.html ***
<teromari at luukku.com> wrote in message
news:<26c64312-ae76-4497-9a40-553a05b6ac52 at s19g2000prg.googlegroups.com>...
> ACE version 5.6.2, Windows XP and VisualStudio 7.1
>
> When application creates a signal handler
> CtrlCSignalHandler pCtrlCSignalHandler(SIGINT);
> ACE_Sig_Handlers aceSignalHandler;
> int intSigKey = aceSignalHandler.register_handler (SIGINT,
> &pCtrlCSignalHandler);
>
> runs it
> ACE_Reactor::instance ()->run_reactor_event_loop();
>
> and releases it
> aceSignalHandler.remove_handler(SIGINT, 0 , 0, intSigKey);
>
> 168bytes are not released.
>
> Allocation: In sig_handler.cpp line 318 there is check,
> if ACE_Sig_Handlers_Set::sig_handlers_[signum] == 0
> When true,
> new ACE_NEW_RETURN (ACE_Sig_Handlers_Set::sig_handlers_[signum]...
> is created.
>
> Release: In sig_handler.cpp line line 502 there is a check,
> if (handler_set->size () == 0)
> When true,
> new_disp->register_action (signum, old_disp)
> sets the line 318 check back to true.
>
> The original allocation was never released.
>
> To my understanding simple fix would be to add
> delete handler_set;
> line somewhere within check,
> if (handler_set->size () == 0)
>
> Is my definition/fix correct?
>
> Thank you,
>
> Tero
More information about the Ace-users
mailing list