Skip to content
  • Alexander Graf's avatar
    linux-user: fix segmentation fault passing with h2g(x) != x · 732f9e89
    Alexander Graf authored
    
    
    When forwarding a segmentation fault into the guest process, we were passing
    the host's address directly into the guest process's signal descriptor.
    
    That obviously confused the guest process, since it didn't know what to make
    of the (usually 32-bit truncated) address. Passing in h2g(address) makes the
    guest process a lot happier.
    
    To make the code more obvious, introduce a h2g_nocheck() macro that does the
    same as h2g(), but allows us to convert addresses that may be outside of guest
    mapped range into the guest's view of address space.
    
    This fixes java running in arm-linux-user for me.
    
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    Signed-off-by: default avatarRiku Voipio <riku.voipio@linaro.org>
    732f9e89