JPH0528053A - Method for memory check of program during system operation - Google Patents

Method for memory check of program during system operation

Info

Publication number
JPH0528053A
JPH0528053A JP3207629A JP20762991A JPH0528053A JP H0528053 A JPH0528053 A JP H0528053A JP 3207629 A JP3207629 A JP 3207629A JP 20762991 A JP20762991 A JP 20762991A JP H0528053 A JPH0528053 A JP H0528053A
Authority
JP
Japan
Prior art keywords
program
check
memory
code
load module
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
JP3207629A
Other languages
Japanese (ja)
Inventor
Yoshihiro Satou
賀浩 佐藤
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP3207629A priority Critical patent/JPH0528053A/en
Publication of JPH0528053A publication Critical patent/JPH0528053A/en
Pending legal-status Critical Current

Links

Landscapes

  • Detection And Correction Of Errors (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Debugging And Monitoring (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)
  • Stored Programmes (AREA)

Abstract

(57)【要約】 【目的】 ハ−ド的なメモリチェック機能やメモリプロ
テクト機能がないシステムで、メモリの破壊を早期に発
見し、無用な誤動作を防ぎ、破壊情報を保存し異常原因
の解析を容易にすることを目的とする。 【構成】 本発明によるメモリチェック方法は、ロ−ド
モジュ−ル・プログラムが格納されているFD1と、ラ
イブラリ−等があるディスク2と、ロ−ドモジュ−ル・
ライブラリ−3と、チェック対象のAプログラム4,9
と、Bプログラム5,10等と、チェックプログラム7,
8と、ロ−ダプログラム6,11と、主メモリ12と、
CPU13で構成される。
(57) [Summary] [Purpose] In a system that does not have a hard memory check function or memory protect function, detect memory damage early, prevent unnecessary malfunction, save damage information, and analyze the cause of abnormality. The purpose is to facilitate. According to the memory check method of the present invention, an FD 1 in which a load module program is stored, a disk 2 having a library, etc., and a load module
Library-3 and A program 4,9 to be checked
, B program 5, 10 etc. and check program 7,
8, loader programs 6 and 11, main memory 12,
It is composed of the CPU 13.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、ソフトウェアの動作中
におけるロ−ドモジュ−ル・プログラム(以下プログラ
ムと書く)のコ−ド部の破壊を早期に検出するプログラ
ムのメモリチェック方法に関するものである。なお、こ
こで適用されるシステムは、システム運転中に、ハ−ド
的なメモリチェック機能、メモリプロテクト機能がない
システムで、対象となるプログラムはコ−ド部とデ−タ
部が分離されているものとする。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program memory check method for early detection of destruction of a code portion of a load module program (hereinafter referred to as a program) during operation of software. .. Note that the system applied here is a system that does not have a hard memory check function or memory protect function during system operation, and the target program has a separate code section and data section. Be present.

【0002】[0002]

【従来技術】従来ハ−ド的なメモリプロテクト機能を持
たないシステムでは、動作中にプログラムのコ−ド部が
破壊された場合、その時点では検出されずシステムダウ
ン後、主メモリやディスクの情報を解析して検出される
ものであった。
2. Description of the Related Art In a conventional system which does not have a hard memory protection function, if the code part of a program is destroyed during operation, it will not be detected at that time and the information in the main memory or disk will be lost after the system goes down. Was analyzed and detected.

【0003】[0003]

【発明が解決しようとする課題】しかしながら従来技術
では、プログラムのコ−ド部が破壊された時点では異常
信号が検出されず誤動作の検出が遅れ、システムの運用
に支障をきたす。又コ−ド部が破壊されたままのプログ
ラムが実行され、更に他のメモリ−を破壊する場合があ
る。この場合は、システムダウン後に主メモリやディス
クの情報を解析しても最初の異常原因の解明が不可能に
なる、という問題点があった。
However, in the prior art, when the code part of the program is destroyed, an abnormal signal is not detected and the detection of malfunction is delayed, which hinders the operation of the system. In addition, the program in which the code portion is destroyed may be executed, and other memory may be destroyed. In this case, there is a problem that it is impossible to elucidate the cause of the first abnormality even if the information in the main memory or the disk is analyzed after the system goes down.

【0004】本発明は上述の点に鑑みてなされたもの
で、 上記問題点の影響を最小限に留めるように異常を早期
検出し、破壊された後の無用の誤動作を防ぎ、シス
テムダウン後の異常原因の解析を容易にする、為のシス
テム運転中のプログラムのメモリチェック方法を提供す
ることを目的とする。
The present invention has been made in view of the above points, and detects an abnormality early so as to minimize the influence of the above problems, prevents an unnecessary malfunction after being destroyed, and prevents a system from being downed. An object of the present invention is to provide a memory check method for a program during system operation for facilitating the analysis of the cause of an abnormality.

【0005】[0005]

【課題を解決するための手段】上記課題を解決するため
本発明は、図1に示すチェックプログラムを設けた。ま
ずチェック対象となるAプログラムはフロッピーディス
クFD1からロ−ダにより主メモリを通してロ−ドモジ
ュ−ル・ライブラリ−3に読み込まれる。この時にロ−
ダは、プログラムのコ−ド部の総和を計算しチェックコ
−ドとしてコ−ド部の後部に保存する。図2にその動作
をフロ−チャ−トに示す。その他のプログラムも同様に
ロ−ドモジュ−ル・ライブラリ−3に読み込まれる。ロ
−ドモジュ−ル・ライブラリ−は主メモリ12にあって
もよい。
In order to solve the above problems, the present invention provides a check program shown in FIG. First, the A program to be checked is read from the floppy disk FD1 into the load module library-3 through the main memory by the loader. At this time
The datum calculates the total sum of the code part of the program and stores it as a check code in the rear part of the code part. The operation is shown in the flow chart in FIG. Other programs are similarly loaded into the load module library-3. The load module library may be in the main memory 12.

【0006】プログラムがタスクとして実行されると
き、チェック対象となるプログラムは主メモリ12に呼
び出されて実行される。実行対象プログラムが待ち状態
になった時、CPUが他に実行するタスクがないとき、
チェックプログラムを主メモリに呼び出しタスクとして
実行する。図3にその動作のフロ−チャ−トを示す。こ
の時チェック対象となるプログラムのチェックコ−ドを
計算し前記保存されているチェックコ−ドと比較し、も
しその値が等しくなければ、そのチェック対象プログラ
ムは破壊されたと判断し、システムを停止し破壊された
アドレスとかコ−ド等の異常情報を保存する。以上の作
業をすべてのチェック対象のプログラムに対して行う。
チェックプログラム自身もチェック対象となる。
When the program is executed as a task, the program to be checked is called by the main memory 12 and executed. When the program to be executed enters the waiting state, when there is no other task to be executed by the CPU,
Execute the check program in the main memory as a calling task. FIG. 3 shows a flowchart of the operation. At this time, the check code of the program to be checked is calculated and compared with the stored check code. If the values are not equal, it is judged that the program to be checked is destroyed and the system is stopped. Then, the abnormal information such as the destroyed address and the code is saved. Perform the above work for all programs to be checked.
The check program itself will also be checked.

【0007】[0007]

【作用】本発明によれば、チェック対象プログラムは、
最初にライブラリ−に読み込まれる時にチェックコ−ド
が計算され正しいチェックコ−ドとして保存される。こ
のプログラムがタスクとして実行中の待ち状態にされた
時、再度チェックコ−ドが計算されて両チェックコ−ド
が比較されるので、この期間にプログラムが破壊された
か否かが分かる。
According to the present invention, the program to be checked is
When first loaded into the library, the check code is calculated and saved as the correct check code. When this program is placed in a waiting state while being executed as a task, the check code is calculated again and both check codes are compared, so that it is possible to know whether or not the program was destroyed during this period.

【0008】このチェックプログラムは、優先順位が最
も低いタスクとして実行されるのでシステムの性能には
悪影響を与えない。破壊される原因としてハ−ド的な故
障やソフト的には自分自身のタスクの暴走や他のタスク
の暴走で壊される場合がある。例えば、図1のAプログ
ラム9が自分自身を壊す場合もあり、Bプログラム10
により壊される場合もあるが、何れの原因で破壊されて
もチェックコ−ドで検出可能である。
Since this check program is executed as a task having the lowest priority, it does not adversely affect the system performance. As a cause of destruction, there are cases where it is destroyed due to a hard failure or software-related runaway of its own task or runaway of another task. For example, the A program 9 in FIG. 1 may destroy itself, and the B program 10
Although it may be destroyed by the check, even if it is destroyed by any cause, it can be detected by the check code.

【0009】[0009]

【実施例】以下本発明の一実施例を図面に基づいて詳細
に説明する。図1は本発明によるチェック時のシステム
の状態を示す図、図2はチェック対象プログラムをライ
ブラリに読み込むときのチェックコ−ドを計算し付加す
るフロ−チャ−ト、図3はチェックプログラムのフロ−
チャ−トである。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described in detail below with reference to the drawings. FIG. 1 is a diagram showing the state of the system at the time of checking according to the present invention, FIG. 2 is a flowchart for calculating and adding a check code when reading a program to be checked into a library, and FIG. 3 is a flowchart of the check program. −
It's a chart.

【0010】プログラムはフロッピーディスクFD1か
ら主メモリ12を通してディスク2のロ−ドモジュ−ル
・ライブラリ−3に読み込まれる。フロッピーディスク
FD1は、ディスク2上であっても他の外部メモリであ
ってもよく、ロ−ドモジュ−ル・ライブラリ3は主メモ
リ12にあってもよい。ロ−ドモジュ−ル・ライブラリ
−3にはチェック対象となるAプログラム4、Bプログ
ラム5、ロ−ダプログラム6、チェックプログラム7等
の多くのプログラムが格納されている。
The program is read from the floppy disk FD1 through the main memory 12 into the load module library-3 of the disk 2. The floppy disk FD1 may be on the disk 2 or another external memory, and the load module library 3 may be in the main memory 12. The load module library-3 stores many programs to be checked, such as A program 4, B program 5, loader program 6 and check program 7.

【0011】これらのプログラムは、コ−ド部とデ−タ
部が分離されコ−ド部の後部にチェックコ−ドが格納さ
れる構造になっている。これらのプログラムが実行され
るときは、主メモリ12上に必要なエリヤ8,9,1
0,11が確保され、ディスク2のロ−ドモジュ−ル・
ライブラリ−3からロ−ダプログラム11によって主メ
モリ12上に呼び出され、必要な環境条件が準備されて
CPU13によってタスクとして実行される。各タスク
は、優先順位の高い順に実行される。チェックプログラ
ムを実行するタスクは、優先順位を最低に設定してお
く。こうすることにより他のタスクの実行を邪魔するこ
となくチェックすることが可能となる。
These programs have a structure in which a code part and a data part are separated and a check code is stored in the rear part of the code part. When these programs are executed, the areas 8, 9, 1 required on the main memory 12 are required.
0, 11 are secured, the load module of the disk 2
It is called from the library-3 to the main memory 12 by the loader program 11, the necessary environmental conditions are prepared, and the CPU 13 executes it as a task. Each task is executed in descending order of priority. The task that executes the check program has the lowest priority. This makes it possible to check the execution of other tasks without disturbing them.

【0012】本発明によるメモリチェックは、上記に詳
述した状態で、チェックプログラム7で行われ、最初の
チェックコ−ドの付加は、ロ−ダプログラム6によって
行われる。図2に基づいてチェックコ−ド付加の動作を
説明する。プログラムをロ−ドモジュ−ル・ライブラリ
−に読み込む際、コ−ド部の先頭アドレスを取り出す
(ステップST1)。次にコ−ド部の最終アドレスを取
り出す(ステップST2)。コ−ド部の先頭から最終ま
でを加算し(ステップST3)チェックコ−ドとして所
定の場所に格納する(ステップST4)。
The memory check according to the present invention is performed by the check program 7 in the state described in detail above, and the addition of the first check code is performed by the loader program 6. The operation of adding a check code will be described with reference to FIG. When the program is read into the load module library, the head address of the code section is taken out (step ST1). Next, the final address of the code portion is taken out (step ST2). From the beginning to the end of the code section is added (step ST3) and stored in a predetermined place as a check code (step ST4).

【0013】次にチェックプログラムの動作を図3に基
づいて説明する。プログラムインデックスを初期化する
(ステップST11)。同インデックスで指定されたチ
ェック対象のプログラムのコ−ド部の先頭アドレスと最
終アドレスを取り出す(ステップST12)。図2と同
じ方法でチェックコ−ドを計算し(ステップST1
3)、保存されているチェックコ−ドと比較する(ステ
ップST14)。もし同じであれば、今のプログラムが
最終プロッグラムかどうかチェックし(ステップST1
5)、もし最終プログラムでなければインデックスを次
に進め(ステップ16)、最終プログラムであればステ
ップST1より繰り返す。ステップST4でチェックコ
−ドが等しくなければ異常と見做し、破壊されたアドレ
スやコ−ドなどの異常情報を保存してシステムを停止す
る(ステップST17)。
Next, the operation of the check program will be described with reference to FIG. The program index is initialized (step ST11). The leading address and the ending address of the code portion of the program to be checked designated by the index are taken out (step ST12). The check code is calculated in the same manner as in FIG. 2 (step ST1
3) Compare with the stored check code (step ST14). If the same, check whether the current program is the final program (step ST1).
5) If it is not the final program, the index is advanced to the next (step 16), and if it is the final program, the process is repeated from step ST1. If the check codes are not equal in step ST4, it is considered to be abnormal, and abnormal information such as the destroyed address and code is saved and the system is stopped (step ST17).

【0014】[0014]

【発明の効果】以上、詳細に説明したように本発明によ
れば、下記のような効果が期待できる。 プログラムのコ−ド部の破壊を早期に検出できる。 破壊されたプログラムが実行されることによる誤動作
を防ぐことができる。 破壊されたアドレスとかコ−ド等の破壊情報が保存さ
れ、無用な誤動作を最小限に抑えるためにシステム停止
後の原因解析が容易になる。
As described above in detail, according to the present invention, the following effects can be expected. The destruction of the code part of the program can be detected early. It is possible to prevent malfunction due to execution of a destroyed program. Damaged information such as destroyed addresses and codes is saved, and the cause analysis after the system is stopped is facilitated in order to minimize unnecessary malfunctions.

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

【図1】本発明によるメモリチェック時のシステムの状
態を示す図。
FIG. 1 is a diagram showing a state of a system during a memory check according to the present invention.

【図2】本発明に使用するチェックコ−ド計算のフロ−
チャ−ト。
FIG. 2 is a flow chart of check code calculation used in the present invention.
Chart.

【図3】本発明によるメモリチェックプログラムのフロ
−チャ−ト。
FIG. 3 is a flowchart of a memory check program according to the present invention.

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

1 フロッピーディスク 2 ディスク 3 ロ−ドモジュ−ル・ライブラリ− 4 Aプログラム 5 Bプログラム 6 ローダプログラム 7 チェックプログラム 8 チェックプログラム 9 Aプログラム 10 Bプログラム 11 ローダ 12 主メモリ 13 CPU 1 Floppy Disk 2 Disk 3 Load Module Library-4 A Program 5 B Program 6 Loader Program 7 Check Program 8 Check Program 9 A Program 10 B Program 11 Loader 12 Main Memory 13 CPU

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.5 識別記号 庁内整理番号 FI 技術表示箇所 G06F 11/30 320 C 8725−5B ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 5 Identification number Office reference number FI technical display location G06F 11/30 320 C 8725-5B

Claims (1)

【特許請求の範囲】 【請求項1】 システム運転中に、ハ−ド的なメモリチ
ェック機能やメモリプロテクト機能がない計算機システ
ムのメモリチェックの方法において、 ロ−ドモジュ−ル・プログラムをライブラリ−に読み込
むとき、ロ−ドモジュ−ル・プログラムのコ−ド部のチ
ェックコ−ドを計算し保存しておき、システム運転中
に、CPUがタスク処理をする空き時間を利用して、対
象とするタスクのロ−ドモジュ−ル・プログラムのコ−
ド部のチェックコ−ドを計算し、その結果を前記保存さ
れているチェックコ−ドと比較し、もし値が異なればロ
−ドモジュ−ル・プログラムが破壊されたと判断して、
システムを停止させ、不必要な誤動作を防ぎ、異常情報
を保存し障害解析を容易にさせることを特徴とするメモ
リチェック方法。
Claim: What is claimed is: 1. A method for checking a memory of a computer system which does not have a hard memory check function or a memory protect function while the system is operating, wherein a load module program is stored in a library. At the time of reading, the check code of the code part of the load module program is calculated and saved, and the target task is used by utilizing the free time during which the CPU processes the task. Load module program code
The check code of the code section is calculated, the result is compared with the stored check code, and if the value is different, it is determined that the load module program is destroyed,
A memory check method characterized by stopping the system, preventing unnecessary malfunctions, storing abnormal information, and facilitating failure analysis.
JP3207629A 1991-07-24 1991-07-24 Method for memory check of program during system operation Pending JPH0528053A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3207629A JPH0528053A (en) 1991-07-24 1991-07-24 Method for memory check of program during system operation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3207629A JPH0528053A (en) 1991-07-24 1991-07-24 Method for memory check of program during system operation

Publications (1)

Publication Number Publication Date
JPH0528053A true JPH0528053A (en) 1993-02-05

Family

ID=16542963

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3207629A Pending JPH0528053A (en) 1991-07-24 1991-07-24 Method for memory check of program during system operation

Country Status (1)

Country Link
JP (1) JPH0528053A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100908961B1 (en) * 2004-10-04 2009-07-22 야마하 가부시키가이샤 Lead frame and its semiconductor package
CN110222501A (en) * 2019-05-31 2019-09-10 河南思维轨道交通技术研究院有限公司 A kind of inspection method of runtime code, storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100908961B1 (en) * 2004-10-04 2009-07-22 야마하 가부시키가이샤 Lead frame and its semiconductor package
CN110222501A (en) * 2019-05-31 2019-09-10 河南思维轨道交通技术研究院有限公司 A kind of inspection method of runtime code, storage medium

Similar Documents

Publication Publication Date Title
US10460099B2 (en) System and method of detecting malicious code in files
US5511184A (en) Method and apparatus for protecting a computer system from computer viruses
US5367682A (en) Data processing virus protection circuitry including a permanent memory for storing a redundant partition table
US8943592B1 (en) Methods of detection of software exploitation
US6880113B2 (en) Conditional hardware scan dump data capture
US20030070115A1 (en) Logging and retrieving pre-boot error information
US9141464B2 (en) Computing device and method for processing system events of computing device
US8972794B2 (en) Method and apparatus for diagnostic recording using transactional memory
US20090013167A1 (en) Computer device, method for booting the same, and booting module for the same
KR101249693B1 (en) Selecting subroutine return mechanisms
US6725368B1 (en) System for executing a post having primary and secondary subsets, wherein the secondary subset is executed subsequently to the primary subset in the background setting
US20080201618A1 (en) Method for Running a Computer Program on a Computer System
WO2026001164A1 (en) Stack file system, system management method, controller, chip device, and vehicle
JP2008513899A (en) Method for processing a computer program on a computer system
US20060031669A1 (en) Boot method and system
KR20250070996A (en) Method for infinite reset recovery and system thereof
JPH09319574A (en) Computer virus check system
EP3293660A1 (en) System and method of detecting malicious code in files
JP2809986B2 (en) Computer system and program bug avoidance method
JPS6118045A (en) Detecting system of program runaway
JP3185780B2 (en) System monitoring apparatus and method
EP0655686B1 (en) Retry control method and device for control processor
JP3169879B2 (en) Microprocessor runaway detection method
JPH09146789A (en) emulator
KR20190108712A (en) Method for recovering error in non-volatile main memory unit and system therefor