Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么页面错误被认为是陷阱而不是中断?当您尝试访问空指针直到出现分段错误时,究竟会发生什么阶段?以及在这种情况下发送的信号我 SIGILL,对吗?谢谢!
陷阱是由用户空间程序引起的用户空间异常。在这种特定情况下,用户空间程序访问了一个未使用内存管理单元 (MMU) 映射的页面,因此导致了陷阱。另一方面,中断是由外部硬件事件产生的,例如定时器。