Re: [jit] Eliminate fixed-size buffers used with vsnprintf

2014-09-24 Thread Jeff Law
On 09/24/14 14:24, Joseph S. Myers wrote: On Wed, 24 Sep 2014, David Malcolm wrote: The ideal I'm aiming for here is that a well-behaved library should never abort, so I've rewritten these functions to use vasprintf, and added error-handling checks to cover the case where malloc returns NULL wi

Re: [jit] Eliminate fixed-size buffers used with vsnprintf

2014-09-24 Thread Joseph S. Myers
On Wed, 24 Sep 2014, David Malcolm wrote: > The ideal I'm aiming for here is that a well-behaved library should > never abort, so I've rewritten these functions to use vasprintf, and > added error-handling checks to cover the case where malloc returns NULL > within vasprintf. GCC is designed on t

[jit] Eliminate fixed-size buffers used with vsnprintf

2014-09-24 Thread David Malcolm
On Tue, 2014-09-23 at 23:27 +, Joseph S. Myers wrote: [...] > dump::write, recording::context::add_error_va, > recording::string::from_printf all use fixed-size buffers with vsnprintf > but no apparent reason to assume this can never result in truncation, and > missing API comments (lots of