On Sat, Nov 24, 2007 at 11:30:28PM +0200, Kirill A. Shutemov wrote:
> copy_cpu() has been broken since cpu_model added to parameters list of
> cpu_init(). This patch fix copy_cpu() by storing cpu_model string in
> CPUState structure on cpu_init and use this string in copy_cpu().

Please excuse my layman's question: why does each cpu need its own copy
of the string, and not just point to the same const char *cpu_model?

The reason I'm asking is that

> +    char cpu_model_str[32];

might be too short for the feature-reach i386 cpu model string,
and that

> +    strcpy(env->cpu_model_str, cpu_model);

is not safe when this is mind.


Regards,
    Dan.


Reply via email to