Skip to contentSkip to conversation

Crash when dereferencing -1

Qemu-devel Kent Borg 2 participants 2 messages Apr 17, 2008 – Apr 18, 2008

lore
Share & tools
lore

Kent Borg

author
#0 lore raw

Running 0.9.0 on Ubuntu 7.04 host, a Ubuntu 7.04 guest crashes when I dereference -1. This also happens on a Windows XP host running the precompiled Qemu 0.9.1. Both with kqemu.

#include <stdio.h>

main()
{
int *foo = -1;

printf("hello, world %d\n", *foo);
}

-kb

#1 lore raw

Hi

Quoted 4 lines · Kent Borg

Running 0.9.0 on Ubuntu 7.04 host, a Ubuntu 7.04 guest crashes when I dereference -1. This also happens on a Windows XP host running the precompiled Qemu 0.9.1. Both with kqemu.

Quoted 9 lines

#include <stdio.h>

main()
{
int *foo = -1;

printf("hello, world %d\n", *foo);
}

I suspect SIGSEGV isn't handled correctly or just passed to the host, thus triggering process termination.

regards,

Mulyadi.