Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(21)

Issue 180107: Chord/DHash support in ns-3

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 6 months ago by harjotgill
Modified:
8 years, 5 months ago
CC:
ns-3-reviews_googlegroups.com, harjotgill, boonloo_cis.upenn.edu
Visibility:
Public.

Patch Set 1 #

Total comments: 89
Unified diffs Side-by-side diffs Delta from patch set Stats (+9537 lines, -0 lines) Patch
A examples/chord-run/chord-run.cc View 1 chunk +765 lines, -0 lines 1 comment Download
A examples/chord-run/chord-test-script View 1 chunk +111 lines, -0 lines 0 comments Download
A examples/chord-run/waf View 1 chunk +1 line, -0 lines 0 comments Download
A examples/chord-run/wscript View 1 chunk +6 lines, -0 lines 0 comments Download
A src/applications/chord-ipv4/AUTHORS View 1 chunk +9 lines, -0 lines 1 comment Download
A src/applications/chord-ipv4/chord-identifier.h View 1 chunk +163 lines, -0 lines 18 comments Download
A src/applications/chord-ipv4/chord-identifier.cc View 1 chunk +351 lines, -0 lines 0 comments Download
A src/applications/chord-ipv4/chord-ipv4.h View 1 chunk +405 lines, -0 lines 3 comments Download
A src/applications/chord-ipv4/chord-ipv4.cc View 1 chunk +1588 lines, -0 lines 10 comments Download
A src/applications/chord-ipv4/chord-message.h View 1 chunk +674 lines, -0 lines 4 comments Download
A src/applications/chord-ipv4/chord-message.cc View 1 chunk +737 lines, -0 lines 0 comments Download
A src/applications/chord-ipv4/chord-node.h View 1 chunk +176 lines, -0 lines 6 comments Download
A src/applications/chord-ipv4/chord-node.cc View 1 chunk +188 lines, -0 lines 0 comments Download
A src/applications/chord-ipv4/chord-node-table.h View 1 chunk +126 lines, -0 lines 14 comments Download
A src/applications/chord-ipv4/chord-node-table.cc View 1 chunk +265 lines, -0 lines 4 comments Download
A src/applications/chord-ipv4/chord-transaction.h View 1 chunk +145 lines, -0 lines 2 comments Download
A src/applications/chord-ipv4/chord-transaction.cc View 1 chunk +138 lines, -0 lines 0 comments Download
A src/applications/chord-ipv4/chord-vnode.h View 1 chunk +295 lines, -0 lines 5 comments Download
A src/applications/chord-ipv4/chord-vnode.cc View 1 chunk +517 lines, -0 lines 0 comments Download
A src/applications/chord-ipv4/dhash-connection.h View 1 chunk +164 lines, -0 lines 0 comments Download
A src/applications/chord-ipv4/dhash-connection.cc View 1 chunk +267 lines, -0 lines 0 comments Download
A src/applications/chord-ipv4/dhash-ipv4.h View 1 chunk +214 lines, -0 lines 1 comment Download
A src/applications/chord-ipv4/dhash-ipv4.cc View 1 chunk +751 lines, -0 lines 6 comments Download
A src/applications/chord-ipv4/dhash-message.h View 1 chunk +358 lines, -0 lines 6 comments Download
A src/applications/chord-ipv4/dhash-message.cc View 1 chunk +353 lines, -0 lines 0 comments Download
A src/applications/chord-ipv4/dhash-object.h View 1 chunk +126 lines, -0 lines 2 comments Download
A src/applications/chord-ipv4/dhash-object.cc View 1 chunk +190 lines, -0 lines 4 comments Download
A src/applications/chord-ipv4/dhash-transaction.h View 1 chunk +109 lines, -0 lines 2 comments Download
A src/applications/chord-ipv4/dhash-transaction.cc View 1 chunk +94 lines, -0 lines 0 comments Download
A src/applications/chord-ipv4/wscript View 1 chunk +35 lines, -0 lines 0 comments Download
A src/helper/chord-ipv4-helper.h View 1 chunk +117 lines, -0 lines 0 comments Download
A src/helper/chord-ipv4-helper.cc View 1 chunk +96 lines, -0 lines 0 comments Download
M src/helper/wscript View 2 chunks +2 lines, -0 lines 0 comments Download
M src/wscript View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 5
Mathieu Lacage
hi, A couple of high-level comments: - coding style: gustavo pointed it out already: you ...
9 years, 6 months ago (2010-01-13 12:51:12 UTC) #1
harjotgill
Thanks for reviewing our code. I am working on your suggestions and will post a ...
9 years, 6 months ago (2010-01-16 17:01:08 UTC) #2
Tom Henderson
Sorry for the delay in reviewing; thanks for submitting to ns-3. I would like to ...
9 years, 6 months ago (2010-01-18 07:32:18 UTC) #3
taher007saeed
Dear all, Thanks Mathieu/Gustavo/Tom for reviewing our code. We have incorporated several suggestions, please visit ...
9 years, 5 months ago (2010-01-24 20:47:01 UTC) #4
Gnomff
8 years, 5 months ago (2011-02-14 00:21:40 UTC) #5
Hello,

I downloaded and installed this Chord application into my ns-3.10 installation,
and I have to say it's excellent. However, I was experiencing some intermittent
crashes while running the test script. An example error message:

Scheduling Command InsertVNode...
*** glibc detected ***
/home/tim/workspace/ns-3-allinone/ns-3.10/build/debug/examples/chord-run/chord-run:
munmap_chunk(): invalid pointer: 0x0868c0c0 ***

After some tinkering I began to expect that the stack was being corrupted. I saw
that in ChordIdentifier, the m_key buffer is not null terminated. It worried me
because GetKey exposes the pointer and is used in user-defined callbacks. You
never know when a silly user is going to use a function that expects a null
terminated string. I created the function

uint8_t *
ChordIdentifier::AllocateBuffer(uint8_t numBytes)
{
	uint8_t * keybuf = (uint8_t *) malloc((numBytes * sizeof (uint8_t)) +1);
	memset(keybuf, 0, numBytes +1);
	return keybuf;
}

to replace all the calls to malloc in ChordIdentifier to make sure m_key is
always null terminated. Since my alteration I haven't seen any more crashes,
although I'm still baffled about where in the code the stack is being corrupted.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b