Project

General

Profile

Actions

Bug #2664

closed

scenario template: ndn::Name double free in __cxa_finalize

Added by Junxiao Shi over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
build
Target version:
-
Start date:
03/22/2015
Due date:
% Done:

100%

Estimated time:
0.50 h

Description

Steps to reproduce:

  1. install ndnSIM, and apply #2662 note-1 workaround
  2. clone ndnSIM-scenario-template
  3. create file ndnSIM-scenario-template/scenarios/hello.cpp with following code:

    #include <ns3/ndnSIM-module.h>
    
    int
    main()
    {
      return 0;
    }
    
  4. execute CXXFLAGS='-std=c++0x -Wall' ./waf configure --debug (#2663 note-1 workaround) followed by ./waf --run=hello

Expected: code builds and scenario terminates without error

Actual: code builds, but scenario fails with *** glibc detected *** build/hello: double free or corruption (!prev): 0x00000000014239d0 ***

======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6( 0x7de16)[0x7fdaaa543e16]
build/hello(__gnu_cxx::new_allocator<ndn::Block>::deallocate(ndn::Block*, unsigned long) 0x20)[0x4d6654]
build/hello(std::_Vector_base<ndn::Block, std::allocator<ndn::Block> >::_M_deallocate(ndn::Block*, unsigned long) 0x32)[0x4d53c4]
build/hello(std::_Vector_base<ndn::Block, std::allocator<ndn::Block> >::~_Vector_base() 0x56)[0x4d4e12]
build/hello(std::vector<ndn::Block, std::allocator<ndn::Block> >::~vector() 0x42)[0x4d3a54]
build/hello(ndn::Block::~Block() 0x1d)[0x4d06df]
build/hello(ndn::Name::~Name() 0x1d)[0x4d0d7b]
/lib/x86_64-linux-gnu/libc.so.6(__cxa_finalize 0x9d)[0x7fdaaa5019cd]
/usr/local/lib/libns3-dev-ndnSIM-debug.so( 0xb0f436)[0x7fdab0d95436]

Files

2664-print-Name-dtor.patch (1.46 KB) 2664-print-Name-dtor.patch Junxiao Shi, 03/23/2015 09:39 AM
patch_ndnsim_scenario.diff (2.18 KB) patch_ndnsim_scenario.diff Christian Kreuzberger, 03/24/2015 12:57 AM

Related issues 1 (0 open1 closed)

Related to ChronoSync - Bug #2842: "double free" reported when smart pointer is created outside of the wrapper classClosed05/28/2015

Actions
Actions

Also available in: Atom PDF