qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Segmentation fault on ARM machine


From: Mayur Aggarwal
Subject: Re: [Qemu-discuss] Segmentation fault on ARM machine
Date: Mon, 7 Jan 2013 10:08:44 +0000

Hi,

 

On qemu, I’ve installed KVM for ARM. I was trying to cause the data abort by writing at invalid address & wanted to see whether that thing will cause Data Abort Exception or not?

In normal case, let’s take an example : on Linux machine it’s expected that by writing at invalid address will cause Segmentation Fault but on ARM machine it shouldn’t cause seg fault because in arm it should handle by appropriate exception handler & should report the same instead of SIGSEGV.

 

 

Thanks,

Mayur

 

From: Shijesta Victor [mailto:address@hidden
Sent: 07 January, 2013 14:02
To: address@hidden; Mayur Aggarwal
Subject: Re: [Qemu-discuss] Segmentation fault on ARM machine

 

I understand that your program on the emulated arm machine seg faulted, and not qemu. Is that correct?

 

That should be the expected behavior, right? The OS wouldn't let you write to arbitrary memory locations - It shouldn't cause the exception to be triggered.

regards,
shijesta

--- On Fri, 4/1/13, Mayur Aggarwal <address@hidden> wrote:


From: Mayur Aggarwal <address@hidden>
Subject: [Qemu-discuss] Segmentation fault on ARM machine
To: "address@hidden" <address@hidden>
Date: Friday, 4 January, 2013, 11:53

Hi All,

 

I’ve installed QEMU on my ubuntu system & configured qemu for ARM machine.

I wrote small program to cause data abort i.e. shown below:

int main() {

  int *p;

  p = 0x12345678;  //assuming non-existing address

  *p = 10;  // should cause data abort

 

  return 0;

}

 

>gcc –g –o db dataabort.c            //compiled

After compiling on arm machine & executing it showing segmentation fault. I tried to see the disassembly but didn’t see that code is entering into DATA_Handler?

 

While debugging (using command gdb) it showed Program received signal SIGSEGV, segmentation fault after executing the last line i.e. *p = 10;

 

Do I need to specify any board name or something before compilation?

Why it’s showing segmentation fault on ARM machine, it should go to specific exception handler?

 

Please tell me how to achieve ARM exceptions ?

 

Regards,

Mayur

 

 



DISCLAIMER:

This email may contain confidential information and is intended only for the use of the specific individual(s) to which it is addressed. If you are not the intended recipient of this email, you are hereby notified that any unauthorized use, dissemination or copying of this email or the information contained in it or attached to it is strictly prohibited. If you received this message in error, please immediately notify the sender at Infotech and delete the original message.

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]