JPH064356A - Abnormal operation detecting system for software - Google Patents

Abnormal operation detecting system for software

Info

Publication number
JPH064356A
JPH064356A JP4166176A JP16617692A JPH064356A JP H064356 A JPH064356 A JP H064356A JP 4166176 A JP4166176 A JP 4166176A JP 16617692 A JP16617692 A JP 16617692A JP H064356 A JPH064356 A JP H064356A
Authority
JP
Japan
Prior art keywords
expected value
software
calculated
storage area
result
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP4166176A
Other languages
Japanese (ja)
Inventor
Akira Watanabe
晶 渡辺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Cable Ltd
Original Assignee
Hitachi Cable Ltd
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 Hitachi Cable Ltd filed Critical Hitachi Cable Ltd
Priority to JP4166176A priority Critical patent/JPH064356A/en
Publication of JPH064356A publication Critical patent/JPH064356A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

PURPOSE:To detect the abnormality of a software without previously calculating an expected value by holding the result of first performing arithmetic for abnormality detection as the expected value and performing comparison with the held expected value in the following arithmetic. CONSTITUTION:The calculation start address of an entry and the number of calculated bytes are extracted and while regarding the contents from a designated memory address as data, the total sum is calculated (step 101.) When the total sum is completely calculated, the contents of a flag is referred to. When the flag is '0,' it is judged that an expected value storage area is empty, the calculated result is written in the expected value storage area, and arithmetic is performed concerning the next entry (steps 102, 103 and 101.) On the other hand, when the flag is '1,' it is judged that the expected value is already written in the expected value storage area, and the calculated result is compared with the value in the expected value storage area (104.) When those values are different as the compared result, abnormal processing is performed.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、ソフトウエアの異常動
作を検出する方式に係わり、特に、データ内容固定領域
に対して演算を行い、その結果を期待値と比較すること
で異常を検出する方式において、事前の期待値計算を不
要としたソフトウエアの異常動作検出方式に係わるもの
である。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for detecting an abnormal operation of software, and in particular, it detects an abnormality by performing an operation on a fixed data content area and comparing the result with an expected value. In the method, it relates to a software abnormal operation detection method that does not require prior expected value calculation.

【0002】[0002]

【従来の技術】従来、通信アダプタ等、組込み型装置上
で動作するソフトウエアでは、ソフトウエアが正常に動
作していることを保証するため、次のような方法が一般
的に取られている。
2. Description of the Related Art Conventionally, in software operating on an embedded device such as a communication adapter, the following method is generally used to ensure that the software is operating normally. .

【0003】(1)ウオッチドッグタイマ方式 このウオッチドッグタイマ方式とは、例えば、一定時間
内に、あるメモリ領域を“1”に設定するようにソフト
ウエアを作成する。そして、この時間間隔よりもやや大
きい一定時間間隔で割り込みを発生させ、メモリが
“1”と成っている場合は、ソフトウエアが正常に動作
していると判断し、メモリの内容を“0”に戻す。メモ
リが“0”であった場合、ソフトウエアの動作に異常が
発生したものと考える方式である。
(1) Watchdog timer system In this watchdog timer system, for example, software is created so that a certain memory area is set to "1" within a fixed time. Then, if an interrupt is generated at a fixed time interval slightly larger than this time interval and the memory is "1", it is determined that the software is operating normally, and the content of the memory is "0". Return to. When the memory is “0”, it is considered that an abnormality has occurred in the software operation.

【0004】(2)内容固定部演算(チェックサム)方
式 このチェックサム方式とは、プロセッサがアイドル(実
行しなければならない仕事がない)状態のときに、ソフ
トウエア動作中でも値が変わらない部分、例えばプロセ
ッサが実行する命令コードを格納している部分の総和を
計算する。そして、予め格納しておいた正しい値と比較
し、等しい場合はソフトウエアが正常動作していると判
断し、一方、値が異なる場合には、ソフトウエアの異常
動作によって、書き変わるはずのないメモリ領域が書き
替えられていると判断する。
(2) Content fixed part arithmetic (checksum) system This checksum system is a part where the value does not change even during software operation when the processor is in the idle state (there is no work to be executed). For example, the sum of the parts storing the instruction codes executed by the processor is calculated. Then, the value is compared with the correct value stored in advance, and if the values are equal, it is determined that the software is operating normally. On the other hand, if the values are different, it cannot be rewritten due to abnormal operation of the software. It is determined that the memory area has been rewritten.

【0005】両方のソフトウエア異常動作検出方式は、
それぞれ単独で使用される場合もあるし、組み合わせて
使用される場合もある。
Both software abnormal operation detection methods are
They may be used alone or in combination.

【0006】[0006]

【発明が解決しようとする課題】従来の内容が変化しな
い領域に対して演算を行う方式では、予め期待値(正常
値)を計算して、ソフトウエア内に保持しておく必要が
ある。しかしこの方法では、ソフトウエアを変更する度
に期待値を計算して格納しておかなければならなくな
る。特にソフトウエア内に内容が変化しない領域が複数
散在している場合、それらに対して演算を行っておくた
めには、専用のソフトウエアを作成して対応しなければ
ならない場合もある。専用ソフトウエアを作成した場合
でも、ソフトウエアの変更により、内容に変化のない領
域の範囲に変化が生じるごとに、その専用ソフトウエア
も変更しなければならなくなる。
In the conventional method of performing calculation on the area where the contents do not change, it is necessary to calculate the expected value (normal value) in advance and hold it in the software. However, with this method, the expected value must be calculated and stored each time the software is changed. In particular, in the case where a plurality of areas in which the contents do not change are scattered in the software, it may be necessary to create dedicated software in order to perform calculations on them. Even if the dedicated software is created, the dedicated software also has to be changed each time the range of the area where the content does not change is changed due to the change of the software.

【0007】本発明は、上記問題点を解消すべく創案さ
れたものであり、ソフトウエアの内、内容の変化しない
領域に対して演算を行い、その結果を期待値と比較する
ことによりソフトウエアの異常動作を検出する方式にお
いて、期待値を予め計算しておくことなくソフトウエア
の異常を検出することができる検出方式を提供すること
を目的とする。
The present invention was devised to solve the above-mentioned problems, and the software is operated by performing an operation on an area where the contents of the software do not change and comparing the result with an expected value. It is an object of the present invention to provide a detection method capable of detecting an abnormality of software without previously calculating an expected value in the method of detecting an abnormal operation.

【0008】[0008]

【課題を解決するための手段】上記目的を達成するため
に、本発明のソフトウエアの異常動作検出方式は、コン
ピュータソフトウエアの内、ソフトウエア実行中でも内
容の変化しない領域に対して演算を行い、その結果を期
待値と比較することによりソフトウエアの異常動作を検
出する方式において、異常検出のための演算を最初に行
った結果を期待値として保持し、以後の演算では保持し
た期待値と比較を行うことによって、ソフトウエアの異
常動作を検出する手段を備えたものである。
In order to achieve the above object, the method of detecting abnormal operation of software according to the present invention performs an operation on a region of computer software whose contents do not change even while the software is being executed. , In the method of detecting abnormal operation of software by comparing the result with the expected value, the result of the first operation for detecting the abnormality is retained as the expected value, It is provided with means for detecting an abnormal operation of software by making a comparison.

【0009】[0009]

【作用】ソフトウエア中で値の変化しない部分に対して
演算を行うモジュールが最初に実行されたとき、演算の
結果として得られた数値を期待値とし、以後、その値と
演算結果を比較することによってソフトウエアの異常動
作を検出する。このため、期待値を予め計算しておく必
要がなくなる。
[Function] When a module for performing an operation on a portion whose value does not change in software is first executed, a numerical value obtained as a result of the operation is set as an expected value, and thereafter, that value is compared with the operation result. To detect abnormal operation of software. Therefore, it is not necessary to calculate the expected value in advance.

【0010】[0010]

【実施例】以下、本発明の実施例を添付図面に基づいて
説明する。
Embodiments of the present invention will be described below with reference to the accompanying drawings.

【0011】図1,図2を用いて、本発明の一実施例を
示す。本例では、演算方式として内容固定部の総和を求
めることにする。
An embodiment of the present invention will be described with reference to FIGS. In this example, the sum of the content fixed parts is obtained as the calculation method.

【0012】まず図1に示すようなテーブルをメモリ上
に作成する。各エントリはそれぞれソフトウエア中の内
容が変化しない領域について1つずつ用意されている。
当然のことながら、内容が変化しない領域が4つ以上あ
る場合、エントリ数も4以上となる。
First, a table as shown in FIG. 1 is created on the memory. One entry is prepared for each area in the software where the contents do not change.
As a matter of course, when there are four or more areas whose contents do not change, the number of entries becomes four or more.

【0013】各エントリ(図中の1,2,3)は、計算
開始アドレス11,計算バイト数12,フラグ13,期
待値格納エリア14で構成される。フラグ13は、初期
値“0”,期待値格納エリア14は最初は空の状態であ
る。
Each entry (1, 2, 3 in the figure) is composed of a calculation start address 11, a calculation byte number 12, a flag 13, and an expected value storage area 14. The flag 13 has an initial value “0”, and the expected value storage area 14 is initially empty.

【0014】異常検出のための計算モジュールは、図2
に示す動作を行う。プロセッサがアイドル状態となる
と、エントリ1から順にテーブルを参照して処理を行
う。
The calculation module for detecting an abnormality is shown in FIG.
Perform the operation shown in. When the processor enters the idle state, the table is sequentially referred to from entry 1 and processing is performed.

【0015】まず、エントリの計算開始アドレス11
と、計算バイト数12(a,b,c)を取り出し、指定
されているメモリアドレスからその内容をデータとみな
し、総和の計算を行う(ステップ101)。
First, the calculation start address 11 of the entry
Then, the calculated number of bytes 12 (a, b, c) is taken out, the contents are regarded as data from the designated memory address, and the total sum is calculated (step 101).

【0016】総和の計算が終了した後、フラグ13の内
容を参照する。フラグ13が“0”の場合、期待値格納
エリア14が空状態であると判断し、計算結果を期待値
格納エリア14に書き込み、次のエントリについての演
算を行う(ステップ102,103,101)。
After the calculation of the sum is completed, the contents of the flag 13 are referred to. When the flag 13 is "0", it is determined that the expected value storage area 14 is empty, the calculation result is written in the expected value storage area 14, and the calculation for the next entry is performed (steps 102, 103, 101). .

【0017】一方、フラグ13が“1”の場合、期待値
格納エアリア14内には、既に期待値が書き込まれてい
るものと判断して、計算結果と期待値格納エリア14内
の値とを比較する(ステップ104)。
On the other hand, when the flag 13 is "1", it is determined that the expected value is already written in the expected value storage area 14, and the calculation result and the value in the expected value storage area 14 are calculated. The comparison is made (step 104).

【0018】比較の結果が等しい場合、ステップ101
に戻って、次のエントリに対する検査に移る。一方、比
較の結果、異なっていた場合、ソフトウエアの異常動作
により変化するはずのない領域が書き変わったものと判
断し(ステップ105)、異常処理を行う。
If the results of the comparison are equal, step 101
Return to and check for the next entry. On the other hand, as a result of the comparison, if they are different from each other, it is determined that an area that should not be changed due to abnormal operation of software is rewritten (step 105), and the abnormal processing is performed.

【0019】本例では、検出動作をフローチャートで説
明したが、同様の操作をハードウエアによって実現する
ことも可能である。
In this example, the detection operation has been described with the flow chart, but the same operation can be realized by hardware.

【0020】[0020]

【発明の効果】以上説明したように、本発明によれば、
ソフトウエア中で値の変化しない部分に対して演算を行
い、その結果を期待値と比較することによりソフトウエ
アの異常動作を検出する方式において、期待値を予め計
算しておくことなく、ソフトウエアの異常動作を検出す
ることが可能となるため、ソフトウエア改造時の期待値
再計算や、ソフトウエア中に内容が変化しない領域が複
数散在している場合の、個々の領域に対する期待値計算
を省略することが可能となる。
As described above, according to the present invention,
In a method that detects an abnormal operation of software by calculating the value that does not change in the software and comparing the result with the expected value, the software does not need to calculate the expected value in advance. Since it is possible to detect the abnormal operation of the, it is possible to recalculate the expected value when modifying the software and to calculate the expected value for each area when there are multiple areas where the contents do not change in the software. It can be omitted.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の一実施例について、異常動作検出のた
めに使用するメモリ内のテーブル構造を示した図であ
る。
FIG. 1 is a diagram showing a table structure in a memory used for detecting an abnormal operation according to an embodiment of the present invention.

【図2】本発明の一実施例について、異常動作検出のた
めの手順を示した図である。
FIG. 2 is a diagram showing a procedure for detecting an abnormal operation in one embodiment of the present invention.

【符号の説明】[Explanation of symbols]

1,2,3 エントリ 11 計算開始アドレス 12 計算バイト数 13 フラグ 14 期待値格納エリア 1, 2 and 3 entries 11 calculation start address 12 calculation byte number 13 flag 14 expected value storage area

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 コンピュータソフトウエアの内、ソフト
ウエア実行中でも内容の変化しない領域に対して演算を
行い、その結果を期待値と比較することによりソフトウ
エアの異常動作を検出する方式において、異常検出のた
めの演算を最初に行った結果を期待値として保持し、以
後の演算では保持した期待値と比較を行うことによっ
て、ソフトウエアの異常動作を検出する手段を備えたこ
とを特徴とするソフトウエアの異常動作検出方式。
1. A method of detecting an abnormal operation of software by performing an operation on an area of the computer software, the content of which does not change even during execution of the software, and comparing the result with an expected value. Is stored as an expected value for the first time, and in subsequent calculations it is compared with the held expected value to detect abnormal operation of the software. Abnormal motion detection method for wear.
JP4166176A 1992-06-24 1992-06-24 Abnormal operation detecting system for software Pending JPH064356A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4166176A JPH064356A (en) 1992-06-24 1992-06-24 Abnormal operation detecting system for software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4166176A JPH064356A (en) 1992-06-24 1992-06-24 Abnormal operation detecting system for software

Publications (1)

Publication Number Publication Date
JPH064356A true JPH064356A (en) 1994-01-14

Family

ID=15826491

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4166176A Pending JPH064356A (en) 1992-06-24 1992-06-24 Abnormal operation detecting system for software

Country Status (1)

Country Link
JP (1) JPH064356A (en)

Similar Documents

Publication Publication Date Title
US5386565A (en) Method and system for controlling/monitoring computer system having plural operating systems to run thereon
JP2010102454A (en) Information processing apparatus and information processing program
JPH064356A (en) Abnormal operation detecting system for software
JP2004185345A (en) Debug method and system
JP2988518B2 (en) Multiprocessor control method
JP2853774B2 (en) Programmable controller
JPH04332055A (en) Method for detecting program runaway
JPS61141047A (en) Saving system of trouble information
JPH1040177A (en) Program check system
JPH0241532A (en) Exception processing method for microprocessor
JPH0782460B2 (en) How to check the recording medium
JPH0784786A (en) Program execution control method
JPH064336A (en) Information processor
JPH05313916A (en) Electronic computer and its interruption processing method
JPH0564933U (en) Electronic computer
JPH01140239A (en) Instruction executing address preserving processing system
JPH07210423A (en) Computer system
JPH08235075A (en) Arithmetic processor
JPH04354019A (en) Sort processor
JPS6282439A (en) False trouble generating system
JPH0520089A (en) Assembly system
JPH0553879A (en) Program fault information collecting system
JPH09160800A (en) Emulator
JPH05100913A (en) Error factor searching system
JPH0651996A (en) Information processor