[reSIProcate] resiprocate crash due to no free memory when receiving sip message with large header

Alan Hawrylyshen alan at polyphase.ca
Fri Jul 11 23:50:22 CDT 2008


On Jul 11, 2008, at 15:25 , Byron Campen wrote:

> 	Ok, I have committed the fix, plus some other fixes. Please take  
> the code on head for a spin and see if it handles your testing.
>
> Best regards,
> Byron Campen
>

Byron,

THanks for that.
Seems reasonable except for the catch(std::bad_alloc&) ... I'm not  
sure it's good MoJo to catch that. Given our amazing reliance on the  
heap, a failure to allocate is a serious problem. I'm more tempted to  
subclass the allocator and create 'transport buffers' as a type that  
we can define an allocator for. Then we can put a limit on the amount  
of memory in play for transport buffers WITHOUT jepordizing the  
operation of the rest of the stack. I realize this is something of a  
change, but it is far safer than implementing a catch of bad_alloc  
when std::operator new(size_t) the the thrower....

My thoughts,
A




More information about the resiprocate-devel mailing list