Skip to content
  • Stefan Weil's avatar
    Support running QEMU on Valgrind · c2a8238a
    Stefan Weil authored
    
    
    Valgrind is a tool which can automatically detect many kinds of bugs.
    
    Running QEMU on Valgrind with x86_64 hosts was not possible because
    Valgrind aborts when memalign is called with an alignment larger than
    1 MiB. QEMU normally uses 2 MiB on Linux x86_64.
    
    Now the alignment is reduced to the page size when QEMU is running on
    Valgrind.
    
    v2:
    Instead of using the macro RUNNING_ON_VALGRIND from valgrind.h,
    the patch now uses a hack from libvirt which tests for the pre-loaded
    vgpreload_*.so shared libraries. This avoids the need for valgrind.h.
    
    Signed-off-by: default avatarStefan Weil <sw@weilnetz.de>
    Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
    c2a8238a