Bus errors are rare nowadays on x86 and occur when your processor cannot even attempt the memory access requested, typically:
- using a processor instruction with an address that does not satisfy its alignment requirements.
Segmentation faults occur when accessing memory which does not belong to your process. They are very common and are typically the result of:
- using a pointer to something that was deallocated.
- using an uninitialized hence bogus pointer.
- using a null pointer.
- overflowing a buffer.
PS: To be more precise, it is not manipulating the pointer itself that will cause issues. It’s accessing the memory it points to (dereferencing).
Related Posts:
- What is a bus error? Is it different from a segmentation fault?
- What causes a segmentation fault (core dump) to occur in C?
- What is newline character — ‘\n’
- Why does ENOENT mean “No such file or directory”?
- segmentation fault : 11
- What are .a and .so files?
- segmentation fault : 11
- Connect: Socket operation on non-socket
- Connect: Socket operation on non-socket
- What is the difference between read and pread in unix?
- What does WEXITSTATUS(status) return?
- What can cause a “Resource temporarily unavailable” on sock send() command
- Which of sprintf/snprintf is more secure?
- Execution of printf() and Segmentation Fault
- What is `S_ISREG()`, and what does it do?
- Reaching EOF with fgets
- segmentation fault using scanf
- Segmentation fault- strcat
- segmentation fault with strcpy [duplicate]
- The difference between n++ and ++n at the end of a while loop? (ANSI C)
- Working on code to calculate cosine with factorial sum
- warning: implicit declaration of function
- Two questions about basic C programs
- What exactly is the difference between “pass by reference” in C and in C++?
- What does “collect2: error: ld returned 1 exit status” mean?
- Floating point exception (core dumped)
- Correct format specifier for double in printf
- How to convert a string to integer in C?
- What is the behavior of integer division?
- Awesomium sdk download
- What is EOF in the C programming language?
- Bad File Descriptor with Linux Socket write() Bad File Descriptor C
- What is the difference between char s[] and char *s?
- Reading from file using read() function
- What is the difference between ++i and i++?
- warning: assignment makes integer from pointer without a cast
- Error “initializer element is not constant” when trying to initialize variable with const
- Cannot assign requested address – possible causes?
- need help understanding the movzbl call in this function
- What does “control reaches end of non-void function” mean?
- connect Error: “No route to host”
- Undefined reference to pow( ) in C, despite including math.h [duplicate]
- C programming, error: called object is not a function or function pointer
- How to convert an int to string in C?
- warning: implicit declaration of function
- Process finished with exit code 11 | Error during malloc [duplicate]
- How does wait(NULL) exactly work?
- C dynamically growing array
- How to replicate vector in c?
- Why do I get an assertion failure?
- Difference between int32, int, int32_t, int8 and int8_t
- Difference between a Structure and a Union
- Xcode – Warning: Implicit declaration of function is invalid in C99
- Error: control may reach end of non-void function in C
- C language: float % float why expression must have integral type
- Reading \r (carriage return) vs \n (newline) from console with getc?
- Invalid pointer error on invoking free() after malloc in C
- In C, how should I read a text file and print all strings
- What does “Size in TCHARs” means?
- wait(null) and wait(&status) C language and Status
- Python ? (conditional/ternary) operator for assignments
- What’s the difference between a file descriptor and file pointer?
- return makes integer from pointer without a cast [-Wint-conversion] return candidate
- Math constant PI value in C
- How can I use an array of function pointers?
- When and why to use malloc?
- Multiple definition of … linker error
- Does sizeof return the number of bytes or the number of octets of a type in C?
- C compile error: Id returned 1 exit status
- How do I concatenate const/literal strings in C?
- Efficient way to find task_struct by pid
- Why am I getting this memory access error ‘double free or corruption’?
- Passing an array by reference in C?
- size of struct in C
- Warning: return from incompatible pointer type in C
- How to generate a random number between 0 and 1?
- How can one print a size_t variable portably using the printf family?
- How to make sense of modulo in c
- “No such file or directory” error in CodeBlocks
- Check if input is integer type in C
- Iterate through a C array
- Meaning of Exit Code 11 in C?
- Uninitialized value was created by a heap allocation
- Makefile:1: *** missing separator. Stop
- xorl %eax – Instruction set architecture in IA-32
- Using floats with sprintf() in embedded C
- Printf width specifier to maintain precision of floating-point value
- PTHREAD_MUTEX_INITIALIZER vs pthread_mutex_init ( &mutex, param)
- How to concatenate string and int in C?
- execvp: bad address error
- How detect malloc failure?
- A Simple, 2d cross-platform graphics library for c or c++?
- Removing last character in C
- error: ISO C forbids nested functions – What’s wrong?
- Dereference void pointer
- Use of flag in c?
- fgetc(stdin) in a loop is producing strange behaviour
- Difference between “while” loop and “do while” loop
- Swapping 2 Bytes of Integer
- GDB no such file or directory