KR100580071B1 - Detcting method for memory error - Google Patents

Detcting method for memory error Download PDF

Info

Publication number
KR100580071B1
KR100580071B1 KR1020040079237A KR20040079237A KR100580071B1 KR 100580071 B1 KR100580071 B1 KR 100580071B1 KR 1020040079237 A KR1020040079237 A KR 1020040079237A KR 20040079237 A KR20040079237 A KR 20040079237A KR 100580071 B1 KR100580071 B1 KR 100580071B1
Authority
KR
South Korea
Prior art keywords
variable
memory
error
value
checking
Prior art date
Application number
KR1020040079237A
Other languages
Korean (ko)
Other versions
KR20060030393A (en
Inventor
양진우
최진
Original Assignee
주식회사 팬택앤큐리텔
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 팬택앤큐리텔 filed Critical 주식회사 팬택앤큐리텔
Priority to KR1020040079237A priority Critical patent/KR100580071B1/en
Publication of KR20060030393A publication Critical patent/KR20060030393A/en
Application granted granted Critical
Publication of KR100580071B1 publication Critical patent/KR100580071B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3624Software debugging by performing operations on the source code, e.g. via a compiler
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

본 발명은 메모리 오류 검출방법에 관한 것으로, 변수에 할당된 메모리 영역 바로 다음 영역에 메모리 오류를 확인하기 위한 별도의 영역을 추가로 할당하고, 이 추가로 할당된 메모리 영역에 사전에 약속된 특정값을 기록한 다음 적절한 시점에서 이 추가로 할당된 메모리 영역값을 확인하여 약속된 특정값인지 검사하여 값이 변했을 경우 메모리 사용에 오류가 발생했음을 알려줌으로써 소프트웨어 개발시의 프로그래밍 과정에서 메모리 사용상의 오류를 쉽고 간편하게 검출할 수 있어 디버깅(Debugging)에 필요한 막대한 시간을 감축할 수 있으므로 소프트웨어 개발 기간을 단축할 수 있고, 소프트웨어의 안정성을 향상시킬 수 있도록 한 것이다.The present invention relates to a method for detecting a memory error, further comprising allocating a separate area for identifying a memory error in an area immediately after the memory area allocated to the variable, and specifying a predetermined value previously promised in the additionally allocated memory area. Record the value of this additionally allocated memory area at the appropriate time and check whether it is a specific value promised, and if the value changes, an error in memory usage has occurred. Detecting can reduce the enormous amount of time required for debugging, shortening software development time and improving software stability.

소프트웨어(Software), 메모리 오류(Memory Error), 디버깅(Debugging)Software, Memory Error, Debugging

Description

메모리 오류 검출방법 {Detcting method for memory error}Memory error detection method {Detcting method for memory error}

도 1 은 본 발명에 따른 메모리 오류 검출방법의 일 실시예에 따른 흐름도1 is a flowchart according to an embodiment of a memory error detection method according to the present invention;

본 발명은 메모리 오류 검출방법에 관한 것으로, 특히 소프트웨어 개발시 메모리 사용상의 오류를 쉽게 검출할 수 있도록 한 기술에 관련된 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory error detection method, and more particularly, to a technique for easily detecting an error in memory use in software development.

소프트웨어(Software)의 프로그래밍(Programming) 도중 가장 빈번하게 발생하는 오류 중의 하나가 메모리 사용상의 오류이다. 소프트웨어가 동작하기 위해서는 통상적으로 수많은 변수가 메모리에 할당되어 사용된다. 이 변수를 위한 메모리는 전원이 오프되면 기억된 데이타가 소거되는 램(RAM)에 할당된다. 별다른 이유가 없는 한 이 변수들은 메모리에서 연속된 주소에 할당되는데, 이 때문에 각 변수를 사용하는데 있어서 할당된 메모리 영역내에서만 정확히 사용해야 한다. One of the most frequent errors during programming of the software is a memory usage error. In order for software to work, many variables are typically allocated and used in memory. Memory for this variable is allocated to RAM, where stored data is erased when the power is turned off. Unless otherwise noted, these variables are assigned to contiguous addresses in memory, which means that each variable must be used exactly within the allocated memory area.

그 이유는 실수로 할당된 크기보다 큰 영역에 걸쳐 변수가 사용될 경우, 바로 다음 메모리 주소에 연속해서 존재하는 다른 변수의 영역을 침범하기 때문이다. 이렇게 될 경우, 침범된 변수가 소프트웨어의 전체 동작에서 핵심적인 기능으로 작용하는 변수라면 소프트웨어를 탑재한 시스템이 멈추거나 오동작하는 등의 이상 현 상이 곧바로 나타날 가능성이 크다. The reason is that if a variable is accidentally used over an area larger than the allocated size, it will invade the area of another variable that is next in memory. In this case, if the affected variable is a key function of the overall operation of the software, it is likely that an abnormal phenomenon such as a system in which the software is mounted is stopped or malfunctions is likely to occur immediately.

또한, 침범된 변수가 그다지 핵심적인 기능을 담당하거나 자주 사용되는 변수가 아닐 경우에는 상당한 시간이 흐른 뒤 오동작을 일으킬 소지도 있으므로, 이 경우엔 디버깅이 매우 어렵게 된다.In addition, if the affected variable does not play a key role or is not frequently used, it may cause a malfunction after a considerable time, so debugging becomes very difficult in this case.

그런데, 지금까지는 소프트웨어 개발시의 프로그래밍 과정에서 이러한 메모리 사용상의 오류를 확인할 만한 특별한 방법들이 없었으며, 단지 프로그래머가 주의해서 프로그래밍하여 문제의 발생 자체를 원천적으로 방지할 수 밖에 없었다. 그러나, 실질적으로 수많은 변수와 함수들로 구성된 복잡한 소프트웨어를 프로그래밍시 이러한 메모리 사용상의 오류를 완벽하게 방지하기에는 많은 어려움이 있다.However, until now, there has been no special way to identify such memory usage errors in the programming process of software development, and only the programmer has to program carefully to prevent the occurrence of problems. However, there are many difficulties in completely avoiding such memory usage errors when programming complex software consisting of a large number of variables and functions.

따라서, 본 발명자는 변수에 할당된 램(RAM) 메모리 영역 바로 다음 영역에 메모리 오류를 확인하기 위한 별도의 영역을 추가로 할당하고, 이 추가로 할당된 메모리 영역에 사전에 약속된 특정값을 기록한 다음 적절한 시점에서 이 추가로 할당된 메모리 영역값을 확인하여 약속된 특정값인지 검사하여, 값이 변했을 경우 메모리가 잘못 사용되었음을 확인할 수 있도록 한 메모리 오류 검출방법에 대한 연구를 하게 되었다.Therefore, the inventor further allocates a separate area for checking for a memory error in an area immediately after the RAM memory area allocated to the variable, and records a predetermined value previously promised in this additionally allocated memory area. Next, at the appropriate time point, this additionally allocated memory area value was checked to check if it was a promised specific value, and then a memory error detection method was performed to confirm that the memory was misused when the value changed.

본 발명은 상기한 취지하에 발명된 것으로, 소프트웨어 개발시의 프로그래밍 과정에서 메모리 사용상의 오류를 쉽고 간편하게 검출할 수 있는 메모리 오류 검출방법을 제공함을 그 목적으로 한다.The present invention has been invented under the above-described object, and an object thereof is to provide a memory error detection method that can easily and easily detect an error in memory use in a programming process during software development.

상기한 목적을 달성하기 위한 본 발명의 일 양상에 따르면, 본 발명에 따른 메모리 오류 검출방법은 소프트웨어에 포함되는 각 변수에 할당된 메모리 영역에 연속하여 메모리 오류 확인을 위한 각 변수별 오류체크 변수에 대한 메모리를 각각 할당한 다음 상기 각 변수별 오류체크 변수를 소정값으로 각각 초기화하고, 적절한 시점에서 상기 각 변수별 오류체크 변수값을 검사하여 검사된 값이 초기화된 값과 다른 값으로 변했는지 확인하여 변했을 경우, 해당 변수에 할당된 메모리에 대한 메모리 오류 정보를 출력하는 것을 특징으로 한다.According to an aspect of the present invention for achieving the above object, the memory error detection method according to the present invention in the error check variable for each variable for the memory error check in succession to the memory area assigned to each variable included in the software Allocate memory for each variable and initialize the error check variable for each variable to a predetermined value, and check the error check variable value for each variable at an appropriate time to check whether the checked value has changed from the initialized value. If changed, the memory error information for the memory allocated to the variable is characterized in that the output.

따라서, 변수에 할당된 메모리 영역 바로 다음 영역에 기록된 약속된 특정값이 변경되었는지 여부를 검출함에 의해 소프트웨어 개발시의 프로그래밍 과정에서 메모리 사용상의 오류를 쉽고 간편하게 검출할 수 있게 된다.Therefore, by detecting whether or not the promised specific value recorded in the area immediately following the memory area allocated to the variable has been changed, it is possible to easily and easily detect an error in memory use during the programming process during software development.

이하, 첨부된 도면을 참조하여 기술되는 바람직한 실시예를 통하여 본 발명을 당업자가 용이하게 이해하고 재현할 수 있도록 상세히 기술하기로 한다.Hereinafter, the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily understand and reproduce the present invention.

도 1 은 본 발명에 따른 메모리 오류 검출방법의 일 실시예에 따른 흐름도이다.1 is a flow chart according to an embodiment of a memory error detection method according to the present invention.

도면에 도시한 바와같이, 본 발명에 따른 메모리 오류 검출방법은 메모리 할당 단계(S110)와, 초기화 단계(S120)와, 검사단계(S130)와, 오류정보 출력단계(S140)를 포함한다.As shown in the figure, the memory error detection method according to the present invention includes a memory allocation step (S110), an initialization step (S120), a check step (S130), and an error information output step (S140).

상기 메모리 할당 단계(S110)는 소프트웨어에 포함되는 각 변수에 할당된 메모리 영역에 연속하여 메모리 오류 확인을 위한 각 변수별 오류체크 변수에 대한 메모리를 각각 할당한다.In the memory allocating step (S110), memory for each error check variable for each variable for memory error checking is sequentially allocated to a memory area allocated to each variable included in software.

즉, 이 메모리 할당 단계(S110)에서는 메모리 영역이 할당된 변수의 바로 인근 메모리 영역에 메모리 오류 확인을 위한 오류체크 변수를 선언한다. 이 때, 상기 변수들은 값을 읽고 쓸 수 있으며, 전원이 오프되면 메모리에 기억된 데이타가 소거되는 램(RAM)에 할당되며, 변수에 메모리 할당시 메모리 시작주소, 할당될 메모리 크기를 지정하는 것이 바람직하다.That is, in this memory allocation step (S110), an error check variable for memory error check is declared in a memory area immediately adjacent to the variable to which the memory area is allocated. At this time, the variables can read and write the values, and when the power is turned off, the variables stored in the memory are allocated to RAM, and the memory start address and the size of the memory to be allocated are assigned. desirable.

이 때, 상기 소프트웨어에 포함되는 변수는 소프트웨어 동작에 중요한 영향을 미치는 핵심 변수인 것이 바람직하다. 그 이유는 소프트웨어에 포함되는 변수는 수없이 많으며, 이 수많은 변수마다 메모리 오류 확인을 위한 오류체크 변수를 프로그래머가 일일이 추가한다는 것은 매우 많은 시간과 노동이 필요한 작업이고, 프로그램 소스도 길어져 소프트웨어의 용량도 커지기 때문이다. 따라서, 굳이 모든 변수에 대해 메모리 오류 확인을 위한 오류체크 변수를 추가하지 않고, 소프트웨어 동작에 중요한 영향을 미치는 핵심 변수들에 대해서만 메모리 오류 확인을 위한 오류체크 변수를 추가함으로써 이러한 문제를 해결할 수 있다.At this time, the variable included in the software is preferably a key variable that has a significant impact on the operation of the software. The reason is that there are many variables included in the software, and it is very time-consuming and labor-intensive for the programmer to add error checking variables to check memory errors for each of these variables. Because it grows. Therefore, this problem can be solved by adding the error check variable for checking the memory error only for the key variables that have a significant influence on the software operation, without adding the error check variable for checking the memory error for all variables.

한편, 상기 메모리 할당 단계(S110)에서 해당 소프트웨어의 컴파일(Compile) 또는 링크(Link)시 컴파일러(Compiler) 또는 링커(Linker)를 통해 일괄적으로 각 변수별 오류체크 변수가 해당 소프트웨어에 추가되도록 구현할 수 도 있다. 즉, 이 경우는 각 변수별 오류체크 변수를 특정의 소프트웨어를 통해 일괄적으로 추가할 수 있도록 함으로써 사용자 편의성을 향상시킨 것이다.Meanwhile, when compiling or linking the corresponding software in the memory allocation step S110, an error check variable for each variable may be added to the corresponding software in a batch through a compiler or a linker. Can also be. That is, in this case, it is possible to add the error check variable for each variable collectively through a specific software to improve user convenience.

한편, 상기 오류체크 변수는 그 크기가 너무 작을 경우에는 오류가 발생해도 확인하지 못할 가능성이 있다. 그 이유는 그 크기가 작을 경우 메모리 오류에 의해 변경된 오류체크 변수값이 사전에 약속된 특정값(초기화값)과 일치할 경우가 발생할 가능성이 크기 때문이다. 그런데, 이러한 가능성을 줄이기 위해 오류체크 변수의 크기를 크게 할 경우에는 메모리 오류 확인을 위한 메모리 사용량이 커지는 문제가 발생하게 된다. 따라서, 메모리 오류 확인을 위한 오류체크 변수의 크기는 적절한 크기로 설정되어야 한다.On the other hand, if the error check variable is too small in size, there is a possibility that the error check may not be confirmed. The reason for this is that when the size is small, there is a high possibility that an error check variable value changed by a memory error coincides with a predetermined value (initial value). However, when the size of the error check variable is increased in order to reduce such a possibility, the memory usage for checking the memory error increases. Therefore, the size of the error check variable for memory error checking should be set to an appropriate size.

상기 초기화 단계(S120)는 상기 각 변수별 오류체크 변수를 소정값으로 각각 초기화한다.The initialization step (S120) initializes the error check variable for each variable to a predetermined value, respectively.

즉, 이 초기화 단계(S120)은 메모리 할당 단계(S110)에 의해 변수별 오류체크 변수에 할당된 메모리 영역에 사전에 약속된 소정값을 기록하여 초기화한다.That is, this initialization step (S120) is initialized by recording a predetermined value promised in advance in the memory area allocated to the error check variable for each variable by the memory allocation step (S110).

이 때, 상기 초기화 단계(S120)에서 해당 소프트웨어의 컴파일(Compile) 또는 링크(Link)시 컴파일러(Compiler) 또는 링커(Linker)를 통해 일괄적으로 각 변수별 오류체크 변수를 소정값으로 각각 초기화하도록 구현할 수 도 있다.At this time, when compiling or linking the corresponding software in the initialization step (S120), the error check variables of each variable are collectively initialized to predetermined values through a compiler or a linker. It can also be implemented.

상기 검사단계(S130)는 상기 각 변수별 오류체크 변수값을 검사하여 검사된 값이 상기 초기화 단계(S120)에서 초기화된 값과 다른 값으로 변했는지 확인한다.The checking step (S130) checks the error check variable value for each variable to determine whether the checked value is changed to a value different from the value initialized in the initializing step (S120).

소프트웨어의 프로그램밍 도중 개발자는 수시로 컴파일(Compile) 및 링크(Link) 작업을 수행하여 실행파일을 생성하여 해당 소프트웨어를 실행하게 된다. During the programming of the software, developers often compile and link to create an executable file to execute the software.

오류체크 변수에 대해 할당된 메모리 영역은 소프트웨어의 실행 과정에서 이용되지 않으므로, 메모리 사용시 오류가 발생하지 않는다면, 상기 초기화 단계(S120)에서 초기화된 값으로 항상 유지될 것이다.Since the memory area allocated for the error check variable is not used during the execution of the software, if an error does not occur when the memory is used, it will always be maintained at the value initialized in the initialization step S120.

그런데, 소프트웨어의 실행 과정에서 메모리 오류가 발생하면, 즉, 변수와 해당 변수에 대응하는 오류체크 변수는 램(RAM)의 메모리 영역에서 연속된 주소에 위치하므로, 변수에 할당된 메모리를 초과하여 사용될 경우 오류체크 변수에 대해 할당된 메모리 영역에 데이타가 기록되게 되고, 이에 따라 초기화 단계(S120)에서 설정된 초기화값이 다른 값으로 변하게 된다.However, if a memory error occurs during the execution of the software, that is, the variable and the error check variable corresponding to the variable are located at consecutive addresses in the memory area of RAM, the memory allocated to the variable is exceeded. In this case, data is recorded in the memory area allocated for the error check variable, and thus the initialization value set in the initialization step S120 is changed to another value.

따라서, 상기 검사단계(S130)를 통해 적절한 시점에서 오류체크 변수값을 검사하여 사전에 약속된 초기화값과 비교하여 다를 경우 메모리 오류가 발생했음을 확인할 수 있게 된다.Therefore, through the checking step (S130), it is possible to check the error check variable value at an appropriate time point, and to confirm that a memory error has occurred when compared with a previously promised initialization value.

이 때, 상기 오류체크 변수값을 검사하는 루틴을 해당 소프트웨어의 소스 코드(Source Code)에 포함하여 구현할 수 도 있으며, 별도의 프로그램으로 구현할 수 도 있다. 램(RAM)의 소정 메모리 영역으로부터 데이타를 독출하여 이를 소정값과 비교하는 기술은 이 출원 이전에 이미 다양하게 공지되어 시행되는 통상적인 기술이므로, 오류체크 변수값을 검사하는 루틴에 대한 자세한 설명은 생략하기로 한다.At this time, the routine for checking the error check variable value may be included in the source code of the corresponding software, or may be implemented as a separate program. Since a technique of reading data from a predetermined memory area of a RAM and comparing it with a predetermined value is a conventional technique that has been widely known and implemented before this application, a detailed description of a routine for checking an error check variable value will be given. It will be omitted.

한편, 상기 검사단계(S130)에서 각 변수별 오류체크 변수값 검사시, 소정 변수의 사용전에 해당 변수의 오류체크 변수값을 검사하도록 구현할 수 도 있다. 즉, 이 경우는 해당 소프트웨어에서 각 변수가 사용되는 시점의 바로전에 해당 변수의 오류체크 변수값을 검사하도록 하여, 해당 변수가 사용되기전 이미 메모리 오류가 발생된 상태인가를 검출할 수 있도록 한 것이다.On the other hand, when checking the error check variable value for each variable in the inspection step (S130), it may be implemented to check the error check variable value of the variable before the use of a predetermined variable. That is, in this case, the software checks the error check variable value of the variable just before each variable is used, and detects whether a memory error has already occurred before the variable is used. .

한편, 상기 검사단계(S130)에서 각 변수별 오류체크 변수값 검사시, 임의의 시점에서 각 변수의 오류체크 변수값을 검사하도록 구현할 수 도 있다. 즉, 이 경우는 프로그래머가 원하는 시점 아무 때나 메모리 오류가 발생했는지 검사하여 이 에 대한 대처가 용이하도록 한 것이다.On the other hand, when checking the error check variable value for each variable in the check step (S130), it may be implemented to check the error check variable value of each variable at any point in time. In other words, in this case, it is easy to cope with this by checking if a memory error occurs at any time desired by the programmer.

한편, 상기 검사단계(S130)에서 각 변수별 오류체크 변수값 검사시, 디버깅(Debugging) 기법을 이용하여 각 변수에 중단위치(Breakpoint)를 걸어 각 변수의 오류체크 변수값을 검사하도록 구현할 수 도 있다. 즉, 이 경우는 프로그램의 오류를 검증하는 디버깅(Debugging) 과정에서 각 변수의 오류체크 변수값을 검사하여 메모리 오류를 알 수 있도록 한 것이다.On the other hand, when checking the error check variable value for each variable in the checking step (S130), it may be implemented to check the error check variable value of each variable by placing a breakpoint on each variable using a debugging (Debugging) technique. have. That is, in this case, the error check variable value of each variable is checked in the debugging process to verify the error of the program so that the memory error can be known.

한편, 상기 검사단계(S130)에서 각 변수별 오류체크 변수값 검사시, 메모리 접근 권한 설정된 변수에 대한 접근이 시도될 경우 해당 변수의 오류체크 변수값을 검사하도록 구현할 수 도 있다. 즉, 이 경우는 해당 소프트웨어가 실행되는 단말기의 CPU가 지원하는 메모리 접근 권한 설정장치 또는 메모리 보호장치 등을 이용하여 해당 변수에 대한 접근을 시도할 경우 발생하는 메모리 오류를 사용자가 알 수 있도록 한 것이다.On the other hand, when checking the error check variable value for each variable in the check step (S130), it can be implemented to check the error check variable value of the variable when the access to the variable set the memory access authority is attempted. That is, in this case, the user can recognize the memory error that occurs when trying to access the variable by using the memory access authority setting device or the memory protection device supported by the CPU of the terminal running the software. .

상기 오류정보 출력단계(S140)는 상기 검사단계(S130)에서 소정 변수의 오류체크 변수값이 변했을 경우, 해당 변수에 할당된 메모리에 대한 메모리 오류 정보를 출력한다.The error information outputting step S140 outputs memory error information on the memory allocated to the variable when an error check variable value of a predetermined variable is changed in the checking step S130.

즉, 상기 오류정보 출력단계(S140)에서는 메모리 오류가 발생했을 경우 이를 프로그래머에게 알려주는 화면을 출력하는 등의 메모리 오류 정보를 출력하여 프로그래머가 알 수 있도록 한다.That is, the error information output step (S140) outputs memory error information such as outputting a screen informing the programmer when a memory error occurs so that the programmer can know.

상기에서 소프트웨어에 추가된 오류체크 변수는 해당 소프트웨어의 실행시에 이용되지 않는 변수이므로, 해당 소프트웨어의 개발이 완료된 경우 소스 코드 (Source Code)에서 삭제되는 것이 바람직하다.Since the error check variable added to the software is not used when the corresponding software is executed, it is preferable that the error check variable is deleted from the source code when the development of the corresponding software is completed.

한편, 본 발명에 따른 메모리 오류 검출방법은 이동통신 단말기, PDA, 개인용 컴퓨터 등의 각종 전자장치에 탑재되는 소프트웨어의 개발 또는 운영시에 활용 가능하다.On the other hand, the memory error detection method according to the present invention can be utilized in the development or operation of software mounted on various electronic devices, such as a mobile communication terminal, PDA, personal computer.

따라서, 위와같이 함에 의해 상기에서 제시한 본 발명에 따른 메모리 오류 검출방법의 목적을 달성할 수 있게 된다.Thus, by the above it is possible to achieve the object of the memory error detection method according to the present invention presented above.

이상에서 설명한 바와같은 본 발명에 따른 메모리 오류 검출방법은 변수에 할당된 메모리 영역 바로 다음 영역에 메모리 오류를 확인하기 위한 별도의 영역을 추가로 할당하고, 이 추가로 할당된 메모리 영역에 사전에 약속된 특정값을 기록한 다음 적절한 시점에서 이 추가로 할당된 메모리 영역값을 확인하여 약속된 특정값인지 검사하여 값이 변했을 경우 메모리 사용에 오류가 발생했음을 알려줌으로써 소프트웨어 개발시의 프로그래밍 과정에서 메모리 사용상의 오류를 쉽고 간편하게 검출할 수 있어 디버깅(Debugging)에 필요한 막대한 시간을 감축할 수 있으므로 소프트웨어 개발 기간을 단축할 수 있고, 소프트웨어의 안정성을 향상시킬 수 있는 등의 유용한 효과를 가진다.As described above, the memory error detecting method according to the present invention additionally allocates a separate area for confirming a memory error to an area immediately after the memory area allocated to the variable, and promises the memory area in advance. Record the specific value and then check the value of this additionally allocated memory area at the appropriate time and check if it is the promised specific value. Then, if the value changes, an error in memory usage has occurred. It can be detected easily and simply, which can reduce the enormous time required for debugging, which can shorten the software development period and improve the stability of the software.

본 발명은 첨부된 도면에 의해 참조되는 바람직한 실시예를 중심으로 기술되었지만, 이러한 기재로부터 후술하는 특허청구범위에 의해 포괄되는 범위내에서 본 발명의 범주를 벗어남이 없이 다양한 변형이 가능하다는 것은 명백하다.While the invention has been described with reference to the preferred embodiments, which are referred to by the accompanying drawings, it is apparent that various modifications are possible without departing from the scope of the invention within the scope covered by the following claims from this description. .

Claims (10)

소프트웨어에 포함되는 각 변수에 할당된 메모리 영역에 연속하여 메모리 오류 확인을 위한 각 변수별 오류체크 변수에 대한 메모리를 각각 할당하는 메모리 할당 단계와;A memory allocation step of allocating a memory for an error check variable for each variable for memory error check in succession to a memory area allocated to each variable included in software; 상기 각 변수별 오류체크 변수를 소정값으로 각각 초기화하는 초기화 단계와;An initialization step of initializing the error check variable for each variable to a predetermined value; 상기 각 변수별 오류체크 변수값을 검사하여 검사된 값이 상기 초기화 단계에서 초기화된 값과 다른 값으로 변했는지 확인하는 검사단계와;A checking step of checking an error check variable value for each variable to determine whether the checked value has changed from a value initialized in the initializing step; 상기 검사단계에서 소정 변수의 오류체크 변수값이 변했을 경우, 해당 변수에 할당된 메모리에 대한 메모리 오류 정보를 출력하는 오류정보 출력단계를;An error information output step of outputting memory error information on a memory allocated to the variable when an error check variable value of a predetermined variable is changed in the checking step; 포함하여 이루어지는 것을 특징으로 하는 메모리 오류 검출방법.Memory error detection method comprising a. 제 1 항에 있어서,The method of claim 1, 상기 메모리 할당 단계에서 해당 소프트웨어의 컴파일(Compile)시 컴파일러(Compiler)를 통해 일괄적으로 각 변수별 오류체크 변수가 해당 소프트웨어에 추가되는 것을 특징으로 하는 메모리 오류 검출방법.And error checking variables for each variable are added to the corresponding software in a batch through a compiler when compiling the corresponding software in the memory allocation step. 제 2 항에 있어서,The method of claim 2, 상기 초기화 단계에서 해당 소프트웨어의 컴파일(Compile)시 컴파일러 (Compiler)를 통해 일괄적으로 각 변수별 오류체크 변수를 소정값으로 각각 초기화하는 것을 특징으로 하는 메모리 오류 검출방법.Memory error detection method, characterized in that for initializing the software in the initialization step (Compile) Compiler (Compiler) through each of the variable error checking variable for each variable to a predetermined value. 제 1 항에 있어서,The method of claim 1, 상기 메모리 할당 단계에서 해당 소프트웨어의 링크(Link)시 링커(Linker)를 통해 일괄적으로 각 변수별 오류체크 변수가 해당 소프트웨어에 추가되는 것을 특징으로 하는 메모리 오류 검출방법.In the memory allocation step, the error check variable for each variable is added to the corresponding software in a batch through a linker when linking the corresponding software. 제 4 항에 있어서,The method of claim 4, wherein 상기 초기화 단계에서 해당 소프트웨어의 링크(Link)시 링커(Linker)를 통해 일괄적으로 각 변수별 오류체크 변수를 소정값으로 각각 초기화하는 것을 특징으로 하는 메모리 오류 검출방법.Memory error detection method, characterized in that for initializing the error check variable for each variable in a batch through the linker (Linker) of the software, respectively to a predetermined value. 제 2 항 내지 제 4 항 중의 어느 한 항에 있어서,The method according to any one of claims 2 to 4, 상기 검사단계에서 각 변수별 오류체크 변수값 검사시, 소정 변수의 사용전에 해당 변수의 오류체크 변수값을 검사하는 것을 특징으로 하는 메모리 오류 검출방법.When checking the error check variable value for each variable in the checking step, memory error detection method characterized in that for checking the error check variable value of the corresponding variable before using the predetermined variable. 제 2 항 내지 제 4 항 중의 어느 한 항에 있어서,The method according to any one of claims 2 to 4, 상기 검사단계에서 각 변수별 오류체크 변수값 검사시, 임의의 시점에서 각 변수의 오류체크 변수값을 검사하는 것을 특징으로 하는 메모리 오류 검출방법.When the error check variable value check for each variable in the checking step, the error check variable value of each variable at any point of time, characterized in that for checking the error value. 제 2 항 내지 제 4 항 중의 어느 한 항에 있어서,The method according to any one of claims 2 to 4, 상기 검사단계에서 각 변수별 오류체크 변수값 검사시, 디버깅(Debugging) 기법을 이용하여 각 변수에 중단위치(Breakpoint)를 걸어 각 변수의 오류체크 변수값을 검사하는 것을 특징으로 하는 메모리 오류 검출방법.When checking the error check variable value for each variable in the checking step, a memory error detection method for checking the error check variable value of each variable by placing a breakpoint on each variable using a debugging technique (Debugging) . 제 2 항 내지 제 4 항 중의 어느 한 항에 있어서,The method according to any one of claims 2 to 4, 상기 검사단계에서 각 변수별 오류체크 변수값 검사시, 메모리 접근 권한 설정된 변수에 대한 접근이 시도될 경우 해당 변수의 오류체크 변수값을 검사하는 것을 특징으로 하는 메모리 오류 검출방법.When the error check variable value check for each variable in the checking step, when the access to the variable set the memory access authority is attempted, the error check variable value of the variable characterized in that it checks. 제 1 항 내지 제 4 항 중의 어느 한 항에 있어서,The method according to any one of claims 1 to 4, 상기 소프트웨어에 포함되는 변수는 소프트웨어 동작에 중요한 영향을 미치는 핵심 변수인 것을 특징으로 하는 메모리 오류 검출방법.The variable included in the software is a memory error detection method, characterized in that the key variables that have a significant impact on the operation of the software.
KR1020040079237A 2004-10-05 2004-10-05 Detcting method for memory error KR100580071B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020040079237A KR100580071B1 (en) 2004-10-05 2004-10-05 Detcting method for memory error

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020040079237A KR100580071B1 (en) 2004-10-05 2004-10-05 Detcting method for memory error

Publications (2)

Publication Number Publication Date
KR20060030393A KR20060030393A (en) 2006-04-10
KR100580071B1 true KR100580071B1 (en) 2006-05-16

Family

ID=37140435

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020040079237A KR100580071B1 (en) 2004-10-05 2004-10-05 Detcting method for memory error

Country Status (1)

Country Link
KR (1) KR100580071B1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101244684B1 (en) * 2006-07-25 2013-03-18 삼성전자주식회사 Microcomputing apparatus and method capable of detecting error
KR100868762B1 (en) 2006-12-01 2008-11-17 삼성전자주식회사 Method of error detecting method for embedded sofeware
KR100890546B1 (en) * 2007-04-30 2009-03-27 슈어소프트테크주식회사 The method of detecting memory error
KR102598691B1 (en) * 2022-12-15 2023-11-06 이화여자대학교 산학협력단 Detection method for variable vulnerability in software using machine learning

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000010081A2 (en) 1998-08-13 2000-02-24 Sun Microsystems, Inc. Method and apparatus of translating and executing native code in a virtual machine environment
KR20030044319A (en) * 2001-11-29 2003-06-09 엘지전자 주식회사 Debugging method of memory allocation and deallocation for real-time operating system
KR20040076915A (en) * 2003-02-27 2004-09-04 엘지전자 주식회사 Real-time debugging method of digital signal processor
KR20050021241A (en) * 2003-08-21 2005-03-07 산요덴키가부시키가이샤 Program processing apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000010081A2 (en) 1998-08-13 2000-02-24 Sun Microsystems, Inc. Method and apparatus of translating and executing native code in a virtual machine environment
KR20030044319A (en) * 2001-11-29 2003-06-09 엘지전자 주식회사 Debugging method of memory allocation and deallocation for real-time operating system
KR20040076915A (en) * 2003-02-27 2004-09-04 엘지전자 주식회사 Real-time debugging method of digital signal processor
KR20050021241A (en) * 2003-08-21 2005-03-07 산요덴키가부시키가이샤 Program processing apparatus

Also Published As

Publication number Publication date
KR20060030393A (en) 2006-04-10

Similar Documents

Publication Publication Date Title
US7321951B2 (en) Method for testing flash memory power loss recovery
KR100890546B1 (en) The method of detecting memory error
US9183114B2 (en) Error detection on the stack
JP2008009721A (en) Evaluation system and evaluation method thereof
CN113987507A (en) Heap memory vulnerability detection method and device, storage medium and electronic equipment
US11868465B2 (en) Binary image stack cookie protection
KR100825786B1 (en) Memory card and debugging method for the same
KR100580071B1 (en) Detcting method for memory error
CN113377586A (en) Automatic server detection method and device and storage medium
CN111666102A (en) File format conversion method, chip verification method, related device and network chip
KR102425474B1 (en) BinTyper: Type confusion detection without source code
US20130124925A1 (en) Method and apparatus for checking a main memory of a processor
KR20220095986A (en) Method for compiling source code of embeded processor and compiler thereof
CN112052112A (en) Bit flipping error detection method and device based on NOR Flash storage and storage medium
Čečavac et al. Adapting UBIFS file system to android operating system requirements
CN110476153A (en) The method and electronic equipment of access instruction SRAM
CN112468296B (en) Key programming method, system, electronic equipment and storage medium
CN114138588B (en) Method, system, equipment and medium for deriving debug information of controller
CN112527660B (en) Static detection method and device for codes
TWI764581B (en) Memory check method, memory check device and memory check system
CN110187658B (en) Chip processing method and device, chip and elevator outbound board
US10437659B2 (en) Built-in context error variables
JP3314719B2 (en) Flash EEPROM and its test method
JP2013125296A (en) Semiconductor device and method of detecting memory rewrite in semiconductor device
TW201802686A (en) Data storage device and data storage method

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20120502

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20130430

Year of fee payment: 8

LAPS Lapse due to unpaid annual fee