ppc64-linux-user broken since "PPC: Unify dcbzl code path" ?
Hi,
While testing my linux-user smoke-testing setup, I noticed that with current qemu head:
./ppc64-linux-user/qemu-ppc64 ../../qemu-smoke/ppc64/busybox ls
busybox: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted (core dumped)
With a bisect run, the following commit appear breaks this:
8e33944f8c648e579a2827ae6f30e4d66ee87f96
PPC: Unify dcbzl code path
Indeed, after reverting the same command runs fine.
./ppc64-linux-user/qemu-ppc64 ../../qemu-smoke/ppc64/busybox lsMakefile coroutine-ucontext.d qapi-generated
....
The same commit appears to break running 32bit static busybox with qemu-ppc64abi32, But I guess I am supposed to use qemu-ppc instead (which works both before and after the commit).
The static busybox binary is from debian/ppc64,
BusyBox v1.20.2 (Debian 1:1.20.0-6) multi-call binary.
I've also uploaded it to:
http://people.linaro.org/~riku.voipio/busyboxen.tgz
Riku
Quoted 10 lines · Riku Voipio
Hi,
While testing my linux-user smoke-testing setup, I noticed that with current qemu head:
./ppc64-linux-user/qemu-ppc64 ../../qemu-smoke/ppc64/busybox ls
busybox: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) -__builtin_offsetof(structmalloc_chunk, fd)))) &&old_size== 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (structmalloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size &0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted (core dumped)
Quoted 7 lines
With a bisect run, the following commit appear breaks this:
8e33944f8c648e579a2827ae6f30e4d66ee87f96PPC: Unify dcbzl code path
Indeed, after reverting the same command runs fine.
Oh, great. There are 2 bugs coming together here.
1) Linux-user has the dcbzl hack bit in HID5 set by default. This is wrong. It should really just expose the cache line size via auxv.
2) The patch you mentioned restricts the HID5 check to softmmu. So we never even check for the HID5 bit.
Let me write up a patch quickly that at least fixes 2).
Alex