Project

General

Profile

Actions

Bug #1335

closed

ManagerBase::sendResponse should create shared_ptr<Data>

Added by Junxiao Shi about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Management
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

Description

ManagerBase::sendResponse should not allocate Data on the stack. It must use shared_ptr<Data>.

Data cannot be stack-allocated in certain context.

Original report from Minsheng:

When nrd tries to connect to nfd, I get this error from nfd:
DEBUG: [NameTree] Did not find /localhop/nrd, need to insert it to the table
DEBUG: [ManagerBase] responding name: /localhost/nfd/fib/insert/h%11%07%0F%08%08localhop%08%03nrd code: 200 text: Success
Assertion failed: (px != 0), function operator*, file /opt/local/include/boost/smart_ptr/shared_ptr.hpp, line 646.

Actions #1

Updated by Anonymous about 10 years ago

How important is it to wait for #1299? Is it ok to just create the Data with make_shared and consider this bug resolved?

Actions #2

Updated by Junxiao Shi about 10 years ago

It's least important to wait for #1299. I just want to give #1299 some push, because I'm tired of write make_shared<Data> everywhere.

Actions #3

Updated by Alex Afanasyev about 10 years ago

  • Status changed from New to Resolved
Actions #4

Updated by Junxiao Shi about 10 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF