首页 > 代码库 > access violation at address General protection fault
access violation at address General protection fault
https://en.wikipedia.org/wiki/General_protection_fault
In memory errors, the faulting program accesses memory that it should not access. Examples include:
- Attempting to write to a read-only portion of memory
- Attempting to execute bytes in memory which are not designated as instructions
- Attempting to read as data bytes in memory which are designated as instructions
- Other miscellaneous conflicts between the designation of a part of memory and its use
However, many modern operating systems implement their memory access-control schemes via paging instead of segmentation, so it is often the case that invalid memory references in operating systems such as Windows are reported via page faults instead of general protection faults. Operating systems typically provide an abstraction layer (such as exception handling or signals) that hides whatever internal processor mechanism was used to raise a memory access error from a program, for the purposes of providing a standard interface for handling many different types of processor-generated error conditions.
A general protection fault (GPF) in the Intel x86 and AMD x86-64 types of computer microprocessor architectures, and other unrelated architectures, is a fault (a type of interrupt) that can encompass several cases in which protection mechanisms within the processor architecture are violated by any of the programs that are running, either the kernel or a user program. The mechanism is first described in section 9.8.13 in the Intel 80386 programmer‘s reference manual from 1986. A general protection fault is implemented as an interrupt(vector number 13 in decimal) in both the x86 and the AMD64 architectures.
access violation at address General protection fault