Bus Error C
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies bus error 10 c of this site About Us Learn more about Stack Overflow the company Business bus error in c program Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges c bus error core dumped Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: c malloc Sign up Bus error vs Segmentation fault up vote 25 down vote favorite 8 Difference between a bus error and a segmentation fault? Can it happen that a program gives a seg fault and stops for the first time and for the second time it may give a bus error and exit ? c share|improve this question edited May 2 '12 at 12:04
C Segmentation Fault
casperOne 58k10126202 asked May 8 '09 at 6:56 Thunderboltz 6253915 add a comment| 6 Answers 6 active oldest votes up vote 34 down vote accepted On most architectures I've used, the distinction is that: a SEGV is caused when you access memory you're not meant to (e.g., outside of your address space). a SIGBUS is caused due to alignment issues with the CPU (e.g., trying to read a long from an address which isn't a multiple of 4). share|improve this answer answered May 8 '09 at 7:06 paxdiablo 488k1179691416 10 Memory mapped files can also generate SIGBUS. –bk1e May 8 '09 at 16:06 on arm SIGBUS can occur if you read a float from an address that is not 4 byte aligned –shoosh Mar 30 at 7:29 shoosh, I'm pretty certain that's covered by my second bullet point. –paxdiablo Mar 30 at 13:28 add a comment| up vote 11 down vote SIGBUS will also be raised if you mmap() a file and attempt to access part of the mapped buffer that extends past the end of the file, as w
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers
C Printf
or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x pointers in c Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it bus error linux only takes a minute: Sign up Bus error while running a simple string C program up vote 2 down vote favorite I was running this simple program, the output i get is a "bus error". using some debugging statements i http://stackoverflow.com/questions/838540/bus-error-vs-segmentation-fault found the point at which it occurs was at the strcat() call. #include
installing and running ROOT here. Please post bug reports in Jira. Moderator: rootdev Post Reply Search Advanced search First unread post • 3 posts • Page 1 of 1 paco_uk Posts: 2 Joined: Tue Feb 19, 2013 21:44 Intermittent *** Break *** bus error Quote Unread postby paco_uk » Tue Feb 04, 2014 16:45 Hi, I have a problem which is difficult to reproduce. It occurs on about 30% of jobs I submit to the lxplus batch system via bsub but I've only seen it once or twice when running locally. I've tried running my program over a small number of events many times but I still haven't seen the problem. I guess it's something to do with the shell environment or maybe my linking is wrong but I don't know where to start looking. Typically the program crashes on startup, although occasionally it crashes at the start of my event loop. Here is the error message I receive. Is it possible to tell what the problem is being caused by?Code: Select all*** Break *** bus error
===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0 0x00002b3b86d258be in waitpid () from /lib64/libc.so.6
#1 0x00002b3b86cb7909 in do_system () from /lib64/libc.so.6
#2 0x00002b3b80faf1a0 in TUnixSystem::StackTrace() () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.14/x86_64-slc6-gcc46-opt/root/lib/libCore.so
#3 0x00002b3b80fb19f3 in TUnixSystem::DispatchSignals(ESignals) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.14/x86_64-slc6-gcc46-opt/root/lib/libCore.so
#4
#5 0x00002b3b83e1f5cd in G__set_cpp_environmentG__Tree () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.14/x86_64-slc6-gcc46-opt/root/lib/libTree.so
#6 0x00002b3b83ed6d99 in G__cpp_setupG__Tree () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.14/x86_64-slc6-gcc46-opt/root/lib/libTree.so
#7 0x00002b3b8180f783 in G__call_setup_funcs () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.14/x86_64-slc6-gcc46-opt/root/lib/libCint.so
#8 0x00002b3b83edb01d in G__cpp_setup_initG__Tree::G__cpp_setup_initG__Tree() () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.14/x86_64-slc6-gcc46-opt/root/lib/libTree.so
#9 0x00002b3b83ed71bf in __static_initialization_and_destruction_0(int, int) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.14/x86_64-slc6-gcc46-opt/root/lib/libTree.so
#10 0x00002b3b83ed71f4 in _GLOBAL__sub_I_G__Tree.cxx () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.14/x86_64-slc6-gcc46-opt/root/lib/libTree.so
#11 0x00