Re: [Qemu-devel] [PATCH] tcg: consistently access cpu->tb_jmp_cache atomically

2017-06-26 Thread Richard Henderson
On 06/14/2017 05:36 PM, Emilio G. Cota wrote: Some code paths can lead to atomic accesses racing with memset() on cpu->tb_jmp_cache, which can result in torn reads/writes and is undefined behaviour in C11. These torn accesses are unlikely to show up as bugs, but from code inspection they seem po

Re: [Qemu-devel] [PATCH] tcg: consistently access cpu->tb_jmp_cache atomically

2017-06-15 Thread Paolo Bonzini
On 15/06/2017 02:36, Emilio G. Cota wrote: > Some code paths can lead to atomic accesses racing with memset() > on cpu->tb_jmp_cache, which can result in torn reads/writes > and is undefined behaviour in C11. > > These torn accesses are unlikely to show up as bugs, but from code > inspection the

[Qemu-devel] [PATCH] tcg: consistently access cpu->tb_jmp_cache atomically

2017-06-14 Thread Emilio G. Cota
Some code paths can lead to atomic accesses racing with memset() on cpu->tb_jmp_cache, which can result in torn reads/writes and is undefined behaviour in C11. These torn accesses are unlikely to show up as bugs, but from code inspection they seem possible. For example, tb_phys_invalidate does: