<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">This may be one of the most difficult to explain problems, but I'll try. &nbsp;I've been working on the server and everything was OK and then I started getting segfaults. I was confused since the recent changes did NOT involve any malloc'ing / freeing of any sort! After some tedious, tedious commenting and uncommenting (because Eclipse's debugger was totally useless), I found that if I uncomment a single declaration, the segfaults vanish.<div><br class="webkit-block-placeholder"></div><div>I added this BOOL declaration line to the top of <b>processClientInput(</b>client):<div><br class="webkit-block-placeholder"></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span style="color: #7f0055">int</span> processClientInput(<span style="color: #005032">sockAndBufs</span> &amp;client)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">{</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: #7f0055">int</span> bytes = consumeRequestLine(client);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: #7f0055">char</span> ** uri;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: #7f0055">char</span> * uri_string;</div></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>&nbsp;&nbsp;&nbsp;<span class="Apple-style-span" style="font-family: Monaco; font-size: 11px; "><span style="color: #7f0055">bool</span> keepAlive = <span style="color: #7f0055">false</span>; // THIS, OF ALL THINGS IS WHAT CAUSES THE SEGFAULTING</span></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br class="webkit-block-placeholder"></span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 11px;"><span class="Apple-tab-span" style="white-space:pre">        </span>// ... tons more code<br class="webkit-block-placeholder"></span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 11px;"><span class="Apple-tab-span" style="white-space:pre">        </span>// note: uri and uri_string do involve mallocing, but did not give me any trouble in the past<br></span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br class="webkit-block-placeholder"></span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br class="webkit-block-placeholder"></span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 11px;">Can any C/C++ Guru shed some light on this? Why would commenting out the "bool" line lead to no segfaulting? Such an obscure problem is throwing me off so hard that I'm starting to believe this project is just a get-pissed-off-at-c project rather than us learning anything new about socket programming.</span></font></div></div></body></html>