- union 멤버 사용 오류 검출 기법
- ㆍ 저자명
- 주성용,조장우,Joo. Seong-Yong,Jo. Jang-Wu
- ㆍ 간행물명
- 정보과학회논문지. Journal of KIISE. 소프트웨어 및 응용
- ㆍ 권/호정보
- 2011년|38권 4호|pp.224-228 (5 pages)
- ㆍ 발행정보
- 한국정보과학회
- ㆍ 파일정보
- 정기간행물| PDF텍스트
- ㆍ 주제분야
- 기타
C/C++의 union 멤버 사용 오류는 union 변수에 저장된 값의 타입과 다른 타입의 union 멤버를 사용해서 값을 참조하는 것이다. union 멤버 사용 오류를 포함하는 프로그램은 실행 중 오류를 발생하거나 실행 후 적절하지 못한 결과를 발생할 수 있다. 기존 컴파일러는 union 멤버 사용 오류를 다루지 않기 때문에 이를 검출하기 위한 분석기가 필요하다. 본 논문에서는 이 같은 오류를 검출하기 위한 기법을 제안한다. 제안하는 기법은 타입 계산식과 타입 주석을 이용해서 union 멤버 사용 오류를 검출한다.
Errors misusing union member are expressions that refer the value of a union variable with different type from the type of the value. A program with errors misusing union member may occur runtime errors or may return inappropriate results. An analyzer for detecting errors misusing union member is required because the existing compilers in C/C++ does not handle those. In this paper we propose an idea that detects those errors. The proposed method detects errors misusing union member using type annotation and type expressions that compute the types of union members.