#142 Incorrect behavior of __node_alloc_impl::_S_chunk_dealloc

5.1
closed
5
2007-09-04
2007-09-04
No

The last line of __node_alloc_impl::_S_chunk_dealloc() is:
memset(__REINTERPRET_CAST(char*, _S_free_list[0]), 0, _STLP_NFREELISTS * sizeof(_Obj*));
But should be:
memset(__REINTERPRET_CAST(char*, &_S_free_list[0]), 0, _STLP_NFREELISTS * sizeof(_Obj*)); // note ampersand before '_S_free_list[0]'

It seems that this bug is limited to case when the _STLP_LEAKS_PEDANTIC define is set to 1.

Discussion

  • Francois Dumont

    Francois Dumont - 2007-09-04

    Logged In: YES
    user_id=1096600
    Originator: NO

    Thanks for the report, you are right it is only called if _STLP_LEAKS_PEDANTIC is defined and moreover only when application stop or when some dll is unloaded.

    Bests

     
  • Francois Dumont

    Francois Dumont - 2007-09-04
    • assigned_to: nobody --> dums
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks