On 2015-09-30 15:09, Richard Henderson wrote:
> This will catch any overflow of the buffer.
> 
> Add a native win32 alternative for alloc_code_gen_buffer;
> remove the malloc alternative.
> 
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
>  translate-all.c | 210 
> ++++++++++++++++++++++++++++++++------------------------
>  1 file changed, 119 insertions(+), 91 deletions(-)

I havent reviewed the patch in details, but I wonder if that could really
happen? Given the size of the code generation buffer (a few MB at
least), I don't think it's a problem if we don't use it to the last kB,
and thus we could keep some safe margin if needed.

Also what happens if an overflow really happens? In softmmu mode a
segmentation fault will happen. In user-mode I guess the fault will
be forwarded to the guest process, so this will likely wrongly
be interpreted as a bug in the guest code.

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurel...@aurel32.net                 http://www.aurel32.net

Reply via email to