bus error

X

xyz

I am getting a "bus Error" in my program.
My simulation should run for 20 min..but i am getting bus error after
10 min of my simulation....
if this is the case please tell the reason for the bus error ...and
how to resolve this ??


thanks to all
 
E

Erik Wikström

I am getting a "bus Error" in my program.
My simulation should run for 20 min..but i am getting bus error after
10 min of my simulation....
if this is the case please tell the reason for the bus error ...and
how to resolve this ??

You have a bug in your code, might be a bad pointer. Use a debugger, or
printf/cout to find the bug and then analyse and fix it.
 
N

Nick Keighley

I am getting a "bus Error" in my program.
My simulation should run for 20 min..but i am getting bus error after
10 min of my simulation....
if this is the case please tell the reason for the bus error ...and
how to resolve this ??

use a debugger on the core dump
 
P

puzzlecracker

use a debugger on the core dump

Are you sure that core dump would reveal the issue? It's not the
segmentation fault, which is typically caused by a bad pointer or some
undefined behavior in the code. Bus Error is typically caused by
hardware, meaning that your code could be invoking a low level
functionality.

Reference: http://en.wikipedia.org/wiki/Bus_error
 
I

Ian Collins

*Please* don't quote signatures.
Are you sure that core dump would reveal the issue? It's not the
segmentation fault, which is typically caused by a bad pointer or some
undefined behavior in the code. Bus Error is typically caused by
hardware, meaning that your code could be invoking a low level
functionality.

Reference: http://en.wikipedia.org/wiki/Bus_error

That depends on the machine. Some with generate a bus error for a
misaligned memory access.
 
J

James Kanze

On Jul 28, 7:57 am, Nick Keighley <[email protected]>
wrote:
Are you sure that core dump would reveal the issue? It's not
the segmentation fault, which is typically caused by a bad
pointer or some undefined behavior in the code. Bus Error is
typically caused by hardware, meaning that your code could be
invoking a low level functionality.

Did you read the "reference" you're quoting. One of the most
common cases of a bus error is an unaligned access. (Despite
what the article says, on most machines today, trying to access
inexistant memory results in a segment violation, and not a bus
error.)

Whatever the reason for the core dump, however, the core file is
the same.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,171
Messages
2,570,936
Members
47,472
Latest member
KarissaBor

Latest Threads

Top