<p>Re run the code in isolation using the inputs present</p>
<pre><code>~/git/examples$ valgrind ./bin/shuffle 
==5245== Memcheck, a memory error detector
==5245== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==5245== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==5245== Command: ./bin/shuffle
==5245== 
rw_sum[0][143][33]
rw_sum[1][143][33]
rw_sum[2][143][32]
redistributed array
0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|0|0|
fill the truncate t[98] with[2]
0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|
shuffled array
2|2|2|1|1|0|1|1|2|1|1|0|0|0|2|1|2|1|1|2|1|0|2|2|1|0|0|0|1|0|2|2|1|0|0|2|2|2|0|1|0|2|0|1|2|0|2|2|1|0|2|0|0|1|1|0|2|1|2|1|0|2|1|2|1|2|1|2|0|0|2|1|0|0|2|1|2|0|0|2|1|0|0|2|1|1|1|1|2|0|1|1|1|2|0|2|0|0|2|0|
==5245== 
==5245== HEAP SUMMARY:
==5245==     in use at exit: 0 bytes in 0 blocks
==5245==   total heap usage: 1 allocs, 1 frees, 1,024 bytes allocated
==5245== 
==5245== All heap blocks were freed -- no leaks are possible
==5245== 
==5245== For counts of detected and suppressed errors, rerun with: -v
==5245== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1649#issuecomment-423627374">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZcrBYaTA8u5S4duO3oi5M1GFwAx8ks5udS0XgaJpZM4W0cas">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZaNrn4YLwoFstIgXQ571pPKuOmpsks5udS0XgaJpZM4W0cas.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@jchavanton in #1649: Re run the code in isolation using the inputs present \r\n\r\n```\r\n~/git/examples$ valgrind ./bin/shuffle \r\n==5245== Memcheck, a memory error detector\r\n==5245== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.\r\n==5245== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info\r\n==5245== Command: ./bin/shuffle\r\n==5245== \r\nrw_sum[0][143][33]\r\nrw_sum[1][143][33]\r\nrw_sum[2][143][32]\r\nredistributed array\r\n0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|0|0|\r\nfill the truncate t[98] with[2]\r\n0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|\r\nshuffled array\r\n2|2|2|1|1|0|1|1|2|1|1|0|0|0|2|1|2|1|1|2|1|0|2|2|1|0|0|0|1|0|2|2|1|0|0|2|2|2|0|1|0|2|0|1|2|0|2|2|1|0|2|0|0|1|1|0|2|1|2|1|0|2|1|2|1|2|1|2|0|0|2|1|0|0|2|1|2|0|0|2|1|0|0|2|1|1|1|1|2|0|1|1|1|2|0|2|0|0|2|0|\r\n==5245== \r\n==5245== HEAP SUMMARY:\r\n==5245==     in use at exit: 0 bytes in 0 blocks\r\n==5245==   total heap usage: 1 allocs, 1 frees, 1,024 bytes allocated\r\n==5245== \r\n==5245== All heap blocks were freed -- no leaks are possible\r\n==5245== \r\n==5245== For counts of detected and suppressed errors, rerun with: -v\r\n==5245== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)\r\n```"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1649#issuecomment-423627374"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/1649#issuecomment-423627374",
"url": "https://github.com/kamailio/kamailio/issues/1649#issuecomment-423627374",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [kamailio/kamailio] dispatcher algorithm 11 with congestion control memory corruption problem (#1649)",
"sections": [
{
"text": "",
"activityTitle": "**Julien Chavanton**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@jchavanton",
"facts": [

]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"issueId\": 1649,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close issue",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"issueId\": 1649\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/kamailio/kamailio/issues/1649#issuecomment-423627374"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 382846636\n}"
}
],
"themeColor": "26292E"
}
]</script>