Linux API/linux2021. 4. 5. 16:44

이런 에러 처음 겪네 -_-


runtime DIV/0 에러에 가깝다고 해야하나..

(문제는 전부 char 형인데 뜬금없이 float point..)

[링크 :]

[링크 :]

[링크 :]


혹시나 해서 gdb 물려서 실행해보니

Program received signal SIGFPE, Arithmetic exception.


이름은 Floating Point Exception 에서 유래하긴 했는데

"0으로 나누기와 오버플로우를 포함한 모든 산술에러"에서 발생한다고 한다.

Macro: int SIGFPE

The SIGFPE signal reports a fatal arithmetic error. Although the name is derived from “floating-point exception”, this signal actually covers all arithmetic errors, including division by zero and overflow. If a program stores integer data in a location which is then used in a floating-point operation, this often causes an “invalid operation” exception, because the processor cannot recognize the data as a floating-point number.

Actual floating-point exceptions are a complicated subject because there are many types of exceptions with subtly different meanings, and the SIGFPE signal doesn’t distinguish between them. The IEEE Standard for Binary Floating-Point Arithmetic (ANSI/IEEE Std 754-1985 and ANSI/IEEE Std 854-1987) defines various floating-point exceptions and requires conforming computer systems to report their occurrences. However, this standard does not specify how the exceptions are reported, or what kinds of handling and control the operating system can offer to the programmer.

[링크 :]

'Linux API > linux' 카테고리의 다른 글

Stopped (tty input)  (0) 2021.05.21
linux gpio interrupt poll?  (0) 2021.05.04
Floating point exception  (0) 2021.04.05
실행파일 not fount, FATAL: kernel too old  (0) 2021.04.05
spi 통신 예제(linux)  (0) 2021.01.28
linux USB bulk 통신  (0) 2020.10.21
Posted by 구차니

댓글을 달아 주세요