[지식/팁] vector push_back 오류

오랜 동안 서비스 중인 프로그램에서 1달에 1번 정도 비 정규적으로 발생되는 버그가 있었다. 

코드를 추적해 보아도 vector내부 push_back에서 오류가 발생되어 어려움이 있었는데, 결과적으로 memory 누수 문제로 발생 된것으로 가정 후 누수가 의심 되는 부분을 수정 후 표적 관찰 중에 있다.


수정 후 3주 동안 관찰 중


std::allocator<_PARTYLIST_ *>::construct(_PARTYLIST_ * * _Ptr, _PARTYLIST_ * const & _Val)

std::allocator_traits<std::allocator<_PARTYLIST_ *> >::construct<_PARTYLIST_ *,_PARTYLIST_ * const &>(std::allocator<_PARTYLIST_ *> & _Al, _PARTYLIST_ * * _Ptr, _PARTYLIST_ * const & <_Args_0>) 

std::_Wrap_alloc<std::allocator<_PARTYLIST_ *> >::construct<_PARTYLIST_ *,_PARTYLIST_ * const &>(_PARTYLIST_ * * _Ptr, _PARTYLIST_ * const & <_Args_0>) 

std::vector<_PARTYLIST_ *,std::allocator<_PARTYLIST_ *> >::push_back(_PARTYLIST_ * const & _Val)

Party::Member_Add(_PARTYLIST_ * pMember)

0
0
이 글을 페이스북으로 퍼가기 이 글을 트위터로 퍼가기 이 글을 카카오스토리로 퍼가기 이 글을 밴드로 퍼가기

메이커 게시판

번호 제목 글쓴이 날짜 조회수
게시물이 없습니다