<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
Sorry, but we don't modify the code to call <code>exit()</code>​. </div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
We now show you where the memory leak happens as follows. We also attached the reproduction steps, so that you can reproduce this bug based on the README.</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
----<br>
<br>
<div style="font-family: "Droid Sans Mono", "monospace", monospace; font-weight: normal; font-size: 14px; line-height: 19px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<span><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">96</span><span class="ContentPasted0"> bytes in
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">1</span><span class="ContentPasted0"> blocks are definitely lost in loss record
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">292</span><span class="ContentPasted0"> of
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">353</span></span>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    at
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x483BE63</span><span class="ContentPasted0">: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">amd64-linux.so</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    by
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x1716BF</span><span class="ContentPasted0">: OnDemandServerMediaSubsession::getStreamParameters(unsigned int, sockaddr_storage const&, Port const&, Port const&, int, unsigned char, unsigned
 char, TLSState*, sockaddr_storage&, unsigned char&, unsigned char&, Port&, Port&, void*&) (</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">OnDemandServerMediaSubsession.cpp</span><span class="ContentPasted0">:</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">204</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    by
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x1315DB</span><span class="ContentPasted0">: RTSPServer::RTSPClientSession::handleCmd_SETUP_afterLookup2(ServerMediaSession*) (</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">RTSPServer.cpp</span><span class="ContentPasted0">:</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">1585</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    by
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x12F8C3</span><span class="ContentPasted0">: RTSPServer::RTSPClientConnection::handleRequestBytes(int) (</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">RTSPServer.cpp</span><span class="ContentPasted0">:</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">887</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    by
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x170C70</span><span class="ContentPasted0">: GenericMediaServer::ClientConnection::incomingRequestHandler() (</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">GenericMediaServer.cpp</span><span class="ContentPasted0">:</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">324</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    by
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x188D19</span><span class="ContentPasted0">: BasicTaskScheduler::SingleStep(unsigned int) (</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">BasicTaskScheduler.cpp</span><span class="ContentPasted0">:</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">153</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    by
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x18A3C2</span><span class="ContentPasted0">: BasicTaskScheduler0::doEventLoop(char volatile*) (</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">BasicTaskScheduler0.cpp</span><span class="ContentPasted0">:</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">82</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    by
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x15EFD4</span><span class="ContentPasted0">: AC3AudioStreamFramer::samplingRate() (</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">AC3AudioStreamFramer.cpp</span><span class="ContentPasted0">:</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">112</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    by
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x143A87</span><span class="ContentPasted0">: AC3AudioFileServerMediaSubsession::createNewRTPSink(Groupsock*, unsigned char, FramedSource*) (</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">AC3AudioFileServerMediaSubsession.cpp</span><span class="ContentPasted0">:</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">58</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    by
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x17159E</span><span class="ContentPasted0">: OnDemandServerMediaSubsession::getStreamParameters(unsigned int, sockaddr_storage const&, Port const&, Port const&, int, unsigned char, unsigned
 char, TLSState*, sockaddr_storage&, unsigned char&, unsigned char&, Port&, Port&, void*&) (</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">OnDemandServerMediaSubsession.cpp</span><span class="ContentPasted0">:</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">177</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    by
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x1315DB</span><span class="ContentPasted0">: RTSPServer::RTSPClientSession::handleCmd_SETUP_afterLookup2(ServerMediaSession*) (</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">RTSPServer.cpp</span><span class="ContentPasted0">:</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">1585</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    by
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x12F8C3</span><span class="ContentPasted0">: RTSPServer::RTSPClientConnection::handleRequestBytes(int) (</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">RTSPServer.cpp</span><span class="ContentPasted0">:</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">887</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==
</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">160</span><span class="ContentPasted0"> bytes in
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">1</span><span class="ContentPasted0"> blocks are definitely lost in loss record
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">326</span><span class="ContentPasted0"> of
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">353</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    at
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x483BE63</span><span class="ContentPasted0">: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">amd64-linux.so</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    by
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x17177C</span><span class="ContentPasted0">: OnDemandServerMediaSubsession::getStreamParameters(unsigned int, sockaddr_storage const&, Port const&, Port const&, int, unsigned char, unsigned
 char, TLSState*, sockaddr_storage&, unsigned char&, unsigned char&, Port&, Port&, void*&) (</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">OnDemandServerMediaSubsession.cpp</span><span class="ContentPasted0">:</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">210</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    by
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x1315DB</span><span class="ContentPasted0">: RTSPServer::RTSPClientSession::handleCmd_SETUP_afterLookup2(ServerMediaSession*) (</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">RTSPServer.cpp</span><span class="ContentPasted0">:</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">1585</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    by
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x12F8C3</span><span class="ContentPasted0">: RTSPServer::RTSPClientConnection::handleRequestBytes(int) (</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">RTSPServer.cpp</span><span class="ContentPasted0">:</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">887</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    by
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x170C70</span><span class="ContentPasted0">: GenericMediaServer::ClientConnection::incomingRequestHandler() (</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">GenericMediaServer.cpp</span><span class="ContentPasted0">:</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">324</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    by
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x188D19</span><span class="ContentPasted0">: BasicTaskScheduler::SingleStep(unsigned int) (</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">BasicTaskScheduler.cpp</span><span class="ContentPasted0">:</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">153</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    by
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x18A3C2</span><span class="ContentPasted0">: BasicTaskScheduler0::doEventLoop(char volatile*) (</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">BasicTaskScheduler0.cpp</span><span class="ContentPasted0">:</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">82</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    by
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x15EFD4</span><span class="ContentPasted0">: AC3AudioStreamFramer::samplingRate() (</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">AC3AudioStreamFramer.cpp</span><span class="ContentPasted0">:</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">112</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    by
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x143A87</span><span class="ContentPasted0">: AC3AudioFileServerMediaSubsession::createNewRTPSink(Groupsock*, unsigned char, FramedSource*) (</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">AC3AudioFileServerMediaSubsession.cpp</span><span class="ContentPasted0">:</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">58</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    by
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x17159E</span><span class="ContentPasted0">: OnDemandServerMediaSubsession::getStreamParameters(unsigned int, sockaddr_storage const&, Port const&, Port const&, int, unsigned char, unsigned
 char, TLSState*, sockaddr_storage&, unsigned char&, unsigned char&, Port&, Port&, void*&) (</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">OnDemandServerMediaSubsession.cpp</span><span class="ContentPasted0">:</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">177</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    by
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x1315DB</span><span class="ContentPasted0">: RTSPServer::RTSPClientSession::handleCmd_SETUP_afterLookup2(ServerMediaSession*) (</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">RTSPServer.cpp</span><span class="ContentPasted0">:</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">1585</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    by
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0x12F8C3</span><span class="ContentPasted0">: RTSPServer::RTSPClientConnection::handleRequestBytes(int) (</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">RTSPServer.cpp</span><span class="ContentPasted0">:</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">887</span><span class="ContentPasted0">)</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==
</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">== LEAK SUMMARY:</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    definitely lost:
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">256</span><span class="ContentPasted0"> bytes in
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2</span><span class="ContentPasted0"> blocks</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    indirectly lost:
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0</span><span class="ContentPasted0"> bytes in
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0</span><span class="ContentPasted0"> blocks</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==      possibly lost:
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0</span><span class="ContentPasted0"> bytes in
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0</span><span class="ContentPasted0"> blocks</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==    still reachable:
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">25</span><span class="ContentPasted0">,</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">440</span><span class="ContentPasted0"> bytes in
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">372</span><span class="ContentPasted0"> blocks</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">==         suppressed:
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0</span><span class="ContentPasted0"> bytes in
</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">0</span><span class="ContentPasted0"> blocks</span></div>
<div><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">== Reachable blocks (those to which a pointer was found) are not shown.</span></div>
<span><span class="ContentPasted0">==</span><span style="color: rgb(0, 0, 255);" class="ContentPasted0">2720</span><span class="ContentPasted0">== To see them, rerun with: --leak-check=full --show-leak-kinds=all</span></span></div>
<br>
</div>
<div class="elementToProof">
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
</div>
<div style="font-family: "Times New Roman", Times, serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-size: 11pt; font-family: Verdana, Geneva, sans-serif;">------</span></div>
<div style="font-family: "Times New Roman", Times, serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-size: 11pt; font-family: Verdana, Geneva, sans-serif;">Kind Regards,</span></div>
<div style="font-family: "Times New Roman", Times, serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-size: 11pt; font-family: Verdana, Geneva, sans-serif;">Ruijie</span></div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> live-devel <live-devel-bounces@us.live555.com> on behalf of Ross Finlayson <finlayson@live555.com><br>
<b>Sent:</b> Thursday, June 8, 2023 16:28<br>
<b>To:</b> LIVE555 Streaming Media - development & use <live-devel@us.live555.com><br>
<b>Subject:</b> Re: [Live-devel] Memory leak in handleCmd_PLAY</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">        - External Email -<br>
<br>
<br>
<br>
> On Jun 8, 2023, at 5:03 PM, Meng Ruijie <ruijie_meng@u.nus.edu> wrote:<br>
><br>
> Hi,<br>
><br>
> We found one memory leak<br>
<br>
No you didn’t.  You ran “valgrind” on an application that uses our RTSP server implementation.  At one point in the program, you exited it (presumably by modifying the code).  When you exited the program, “valgrind” reported  that 160 bytes were “definitely
 lost”.  So what?  How do know that these 160 bytes would not have been freed later, had you not decided to modify the code to call “exit()”?  And you didn’t say what those 160 bytes were, and where they were allocated.<br>
<br>
Please don’t bother posting random output from “valgrind”, unless you also specifically identify a problem in the code.<br>
<br>
<br>
Ross Finlayson<br>
Live Networks, Inc.<br>
<a href="http://www.live555.com/">http://www.live555.com/</a><br>
<br>
<br>
_______________________________________________<br>
live-devel mailing list<br>
live-devel@lists.live555.com<br>
<a href="http://lists.live555.com/mailman/listinfo/live-devel">http://lists.live555.com/mailman/listinfo/live-devel</a><br>
</div>
</span></font></div>
</body>
</html>