JP5273057B2 - Module update detection program, module update detection method, and module update detection apparatus - Google Patents

Module update detection program, module update detection method, and module update detection apparatus Download PDF

Info

Publication number
JP5273057B2
JP5273057B2 JP2010001581A JP2010001581A JP5273057B2 JP 5273057 B2 JP5273057 B2 JP 5273057B2 JP 2010001581 A JP2010001581 A JP 2010001581A JP 2010001581 A JP2010001581 A JP 2010001581A JP 5273057 B2 JP5273057 B2 JP 5273057B2
Authority
JP
Japan
Prior art keywords
module
code
extracted
updated
update detection
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.)
Expired - Fee Related
Application number
JP2010001581A
Other languages
Japanese (ja)
Other versions
JP2011141702A (en
Inventor
修一郎 藤定
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2010001581A priority Critical patent/JP5273057B2/en
Publication of JP2011141702A publication Critical patent/JP2011141702A/en
Application granted granted Critical
Publication of JP5273057B2 publication Critical patent/JP5273057B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To identify an updated module from compiled binary data. <P>SOLUTION: A module update detection device extracts operation information to be executed by binary data obtained by compiling a source file whose module has been updated from the binary data. The module update detection device extracts a machine language instruction from the operation information, and extracts an updated operation code from the extracted machine language instruction. On the other hand, the module update detection device extracts the operation information to be executed by the binary data obtained by compiling the source file whose module has not been updated yet from the binary data. The module update detection device extracts the machine language instruction from the operation information, and extracts the operation code which has not been updated yet from the extracted machine language instruction. Afterwards, the module update detection device detects whether or not the module has been updated by comparing the updated operation code with the operation code which has not been updated yet. <P>COPYRIGHT: (C)2011,JPO&amp;INPIT

Description

本発明は、モジュール更新検出プログラム、モジュール更新検出方法及びモジュール更新検出装置に関する。   The present invention relates to a module update detection program, a module update detection method, and a module update detection apparatus.

従来、システム仕様の変更等によってプログラムのモジュールが変更されたことを検出する手法として、更新前のモジュールと更新後のモジュールを比較して検出する手法が利用されている。具体的には、モジュールのソースファイルを比較する手法やモジュールのコンパイル後のバイナリデータを比較する手法が利用されている。   2. Description of the Related Art Conventionally, as a method for detecting that a program module has been changed due to a change in system specifications or the like, a method for comparing and detecting a module before update and a module after update has been used. Specifically, a method for comparing module source files and a method for comparing binary data after module compilation are used.

例えば、モジュールのソースファイルを比較する手法の場合、図13の(1)に示すように、ユーザは、ソースファイル内のメソッド等を目視で確認することができるので、メソッドの更新や追加、削除など更新された箇所も目視によって検出することができる。ところが、規模が大きいソースファイルの場合には、ユーザの負担が大きく、さらには、見落としなども発生し、正確に検出することが難しい。このため、最近では、Windiffなどのファイル比較ツールによってソースファイルの比較を行う手法が利用されている。   For example, in the case of the method of comparing the source files of modules, as shown in (1) of FIG. 13, the user can visually check the method and the like in the source file. Such updated locations can also be detected visually. However, in the case of a large-scale source file, the burden on the user is large, and oversight or the like also occurs, so that it is difficult to detect accurately. For this reason, recently, a method of comparing source files with a file comparison tool such as Windiff is used.

そして、コンパイル後のバイナリデータであるクラスファイルを比較する手法の場合、図13の(2)に示すように、ユーザは、クラスファイルを目視で確認することが難しい。ところが、クラスファイルは、元のソースファイルが異なればコンパイル結果も異なる。このことから、モジュール変更前のコンパイルで得られたクラスファイルと変更後のコンパイルで得られたクラスファイルとを比較することで、ソースファイル自体が更新されたか否かを検出することができる。なお、図13は、従来技術を説明する図である。   In the case of a method of comparing class files that are binary data after compilation, it is difficult for the user to visually confirm the class file as shown in (2) of FIG. However, the class file has different compilation results if the original source file is different. From this, it is possible to detect whether or not the source file itself has been updated by comparing the class file obtained by the compilation before the module change with the class file obtained by the compilation after the change. In addition, FIG. 13 is a figure explaining a prior art.

特開平9−251400号公報JP 9-251400 A

しかしながら、従来の技術では、更新前後のモジュールのソースファイルを比較しなければ、更新されたモジュールを特定することができないという課題があった。例えば、ファイル比較ツールによって更新前後のソースファイルを比較した場合、更新されたモジュールを特定できるが、モジュールのソースファイルの比較が必須である。   However, the conventional technique has a problem that an updated module cannot be specified unless the source files of the modules before and after the update are compared. For example, when the source file before and after the update is compared by the file comparison tool, the updated module can be specified, but the comparison of the module source file is essential.

また、コンパイル後のバイナリデータを比較した場合、ソースファイルが更新された又は更新されていないことしか特定することができず、どのモジュールが更新されたかまで特定することができない。つまり、従来のいずれの技術を用いた場合でも、モジュールのソースファイルがなければ、更新されたモジュールを特定することができない。   Further, when comparing the binary data after compilation, it can be specified only that the source file has been updated or not updated, and it cannot be specified which module has been updated. That is, even if any conventional technique is used, an updated module cannot be specified without a module source file.

開示の技術は、上記に鑑みてなされたものであって、コンパイル後のバイナリデータから更新されたモジュールを特定することが可能であるモジュール更新検出プログラム、モジュール更新検出方法及びモジュール更新検出装置を提供することを目的とする。   The disclosed technology has been made in view of the above, and provides a module update detection program, a module update detection method, and a module update detection device capable of specifying an updated module from compiled binary data The purpose is to do.

本願の開示するモジュール更新検出プログラム、モジュール更新検出方法及びモジュール更新検出装置は、一つの態様において、モジュールが更新されたソースファイルをコンパイルして得られたバイナリデータから該バイナリデータによって実行される操作情報を抽出する操作抽出手順をコンピュータに実行させる。また、前記操作抽出手順により抽出された操作情報から機械語命令を抽出する命令抽出手順と、前記命令抽出手順によって抽出された機械語命令からオペコードを抽出するコード抽出手順とをコンピュータに実行させる。また、前記コード抽出手順によって抽出されたオペコードと、前記モジュールが更新される前のソースファイルをコンパイルして得られたバイナリデータから抽出されたオペコードとを比較して、前記モジュールが更新されたか否かを検出する更新検出手順とをコンピュータに実行させる。   In one aspect, a module update detection program, a module update detection method, and a module update detection apparatus disclosed in the present application, in one aspect, are operations performed by binary data from binary data obtained by compiling a source file with an updated module. Causes a computer to execute an operation extraction procedure for extracting information. Further, the computer executes an instruction extraction procedure for extracting a machine language instruction from the operation information extracted by the operation extraction procedure, and a code extraction procedure for extracting an operation code from the machine language instruction extracted by the instruction extraction procedure. Whether the module is updated by comparing the opcode extracted by the code extraction procedure with the opcode extracted from binary data obtained by compiling the source file before the module is updated. The computer executes an update detection procedure for detecting the above.

本願の開示するモジュール更新検出プログラム、モジュール更新検出方法及びモジュール更新検出装置の一つの態様によれば、コンパイル後のバイナリデータから更新されたモジュールを特定することが可能であるという効果を奏する。   According to one aspect of the module update detection program, the module update detection method, and the module update detection apparatus disclosed in the present application, there is an effect that it is possible to specify an updated module from the compiled binary data.

図1は、実施例1に係るモジュール更新検出装置の構成を示すブロック図である。FIG. 1 is a block diagram illustrating the configuration of the module update detection apparatus according to the first embodiment. 図2は、実施例2に係るモジュール更新検出装置の構成を示すブロック図である。FIG. 2 is a block diagram illustrating the configuration of the module update detection apparatus according to the second embodiment. 図3は、検出対象クラスファイルDBに記憶される情報の例を示す図である。FIG. 3 is a diagram illustrating an example of information stored in the detection target class file DB. 図4は、抽出条件DBに記憶されるメソッド抽出の条件例を示す図である。FIG. 4 is a diagram illustrating a condition example of method extraction stored in the extraction condition DB. 図5は、抽出条件DBに記憶される属性抽出の条件例を示す図である。FIG. 5 is a diagram illustrating an example of attribute extraction conditions stored in the extraction condition DB. 図6は、抽出条件DBに記憶されるバイトコード抽出の条件例を示す図である。FIG. 6 is a diagram showing an example of bytecode extraction conditions stored in the extraction condition DB. 図7は、抽出条件DBに記憶されるオペコード抽出の条件例を示す図である。FIG. 7 is a diagram illustrating an example of an operation code extraction condition stored in the extraction condition DB. 図8は、更新前オペコード情報DBに記憶される情報の例を示す図である。FIG. 8 is a diagram illustrating an example of information stored in the pre-update opcode information DB. 図9は、クラスファイルからメソッドを抽出する例を示す図である。FIG. 9 is a diagram illustrating an example of extracting a method from a class file. 図10は、メソッドからオペコードを抽出する例を示す図である。FIG. 10 is a diagram illustrating an example of extracting an operation code from a method. 図11は、実施例2に係るモジュール更新検出装置における処理の流れを示すフローチャートである。FIG. 11 is a flowchart illustrating the flow of processing in the module update detection apparatus according to the second embodiment. 図12は、モジュール更新検出プログラムを実行するコンピュータシステムの例を示す図である。FIG. 12 is a diagram illustrating an example of a computer system that executes a module update detection program. 図13は、従来技術を説明する図である。FIG. 13 is a diagram for explaining the prior art.

以下に、本願の開示するモジュール更新検出プログラム、モジュール更新検出方法及びモジュール更新検出装置の実施例を図面に基づいて詳細に説明する。なお、この実施例によりこの発明が限定されるものではない。   Hereinafter, embodiments of a module update detection program, a module update detection method, and a module update detection apparatus disclosed in the present application will be described in detail with reference to the drawings. Note that the present invention is not limited to the embodiments.

図1は、実施例1に係るモジュール更新検出装置の構成を示すブロック図である。図1に示すモジュール更新検出装置1は、開発途中または開発されたソースコード等のプログラムをテストするテスト機に内蔵されていてもよく、ソースコードをコンパイルするコンパイラーに内蔵されていてもよい。実施例1に係るモジュール更新検出装置1は、コンパイラーと接続され、コンパイラーからコンパイル後のバイナリデータ2を受信する例を示している。   FIG. 1 is a block diagram illustrating the configuration of the module update detection apparatus according to the first embodiment. The module update detection apparatus 1 shown in FIG. 1 may be built in a test machine that tests a program such as a developed source code or the like, or may be built in a compiler that compiles the source code. The module update detection apparatus 1 according to the first embodiment is connected to a compiler and receives an example of binary data 2 after compilation from the compiler.

実施例1に係るモジュール更新検出装置1は、操作抽出部1aと命令抽出部1bとコード抽出部1cと更新検出部1dとを有する。操作抽出部1aは、モジュールが更新されたソースファイルをコンパイルして得られたバイナリデータ2から該バイナリデータによって実行される操作情報を抽出する。   The module update detection apparatus 1 according to the first embodiment includes an operation extraction unit 1a, an instruction extraction unit 1b, a code extraction unit 1c, and an update detection unit 1d. The operation extraction unit 1a extracts operation information executed by the binary data 2 from the binary data 2 obtained by compiling the source file with the updated module.

命令抽出部1bは、操作抽出部1aにより抽出された操作情報から機械語命令を抽出する。コード抽出部1cは、命令抽出部1bによって抽出された機械語命令からオペコードを抽出する。更新検出部1dは、コード抽出部1cによって抽出されたオペコードと、モジュールが更新される前のソースファイルをコンパイルして得られたバイナリデータから抽出されたオペコードとを比較して、モジュールが更新されたか否かを検出する。そして、モジュール更新検出装置1は、比較した結果を更新検出結果3として外部装置に送信したり、ディスプレイ等に表示したりする。   The instruction extraction unit 1b extracts a machine language instruction from the operation information extracted by the operation extraction unit 1a. The code extraction unit 1c extracts an operation code from the machine language instruction extracted by the instruction extraction unit 1b. The update detection unit 1d compares the operation code extracted by the code extraction unit 1c with the operation code extracted from the binary data obtained by compiling the source file before the module is updated, and the module is updated. It is detected whether or not. Then, the module update detection device 1 transmits the comparison result as an update detection result 3 to an external device or displays it on a display or the like.

すなわち、実施例1に係るモジュール更新検出装置1は、モジュール変更によって変更されるオペコードを比較することで、コンパイル後の実資産であるバイナリデータからソースコード内のそのモジュールが更新されたかを検出することができる。この結果、実施例1に係るモジュール更新検出装置1は、コンパイル後のバイナリデータから更新されたモジュールを特定することが可能である。   That is, the module update detection apparatus 1 according to the first embodiment detects whether the module in the source code has been updated from the binary data that is the actual asset after compilation by comparing the operation code changed by the module change. be able to. As a result, the module update detection apparatus 1 according to the first embodiment can specify an updated module from the compiled binary data.

ところで、モジュール更新検出装置は、実施例1で説明した制御部以外にも様々な制御部を有していてもよい。そこで、実施例2では、実施例1で説明した制御部以外にも様々な制御部を有するモジュール更新検出装置について説明する。   By the way, the module update detection apparatus may have various control units other than the control unit described in the first embodiment. Therefore, in the second embodiment, a module update detection apparatus having various control units in addition to the control unit described in the first embodiment will be described.

[モジュール更新検出装置の構成]
まず、図2を用いて、実施例2に係るモジュール更新検出装置の構成を説明する。図2は、実施例2に係るモジュール更新検出装置の構成を示すブロック図である。図2に示すように、モジュール更新検出装置10は、通信制御I/F(InterFace)部11と入力部12と表示部13と記憶部15と制御部20とを有する。
[Configuration of module update detection device]
First, the configuration of the module update detection apparatus according to the second embodiment will be described with reference to FIG. FIG. 2 is a block diagram illustrating the configuration of the module update detection apparatus according to the second embodiment. As illustrated in FIG. 2, the module update detection apparatus 10 includes a communication control I / F (InterFace) unit 11, an input unit 12, a display unit 13, a storage unit 15, and a control unit 20.

通信制御I/F部11は、少なくとも1つの通信ポートを有するインタフェースであり、他の装置との間でやり取りされる情報を制御する。例えば、通信制御I/F部11は、コンパイラーと接続され、Java(登録商標)ソースファイルをコンパイルして得られたクラスファイルを受信し、後述する記憶部15の検出対象クラスファイルDB(DataBase)16や更新前オペコード情報DB18に格納する。また、通信制御I/F部11は、プログラム開発者が利用する管理コンピュータと接続され、モジュールの更新検出処理開始指示を受信し、モジュール更新検出結果等を送信する。   The communication control I / F unit 11 is an interface having at least one communication port, and controls information exchanged with other devices. For example, the communication control I / F unit 11 is connected to a compiler, receives a class file obtained by compiling a Java (registered trademark) source file, and detects a class file DB (DataBase) to be detected in the storage unit 15 described later. 16 and the pre-update opcode information DB 18. The communication control I / F unit 11 is connected to a management computer used by the program developer, receives a module update detection processing start instruction, and transmits a module update detection result and the like.

入力部12は、例えば、キーボードやマウス、マイクなどであり、モジュールの更新検出処理開始指示や終了指示の入力をユーザから受付け、後述する制御部20等に入力する。また、入力部12は、CD(Compact Disc)、DVD(Digital Versatile Disc)や磁気ディスクなどの記憶媒体を読み込んで情報を読み出したり、情報を書き込んだりすることができる。例えば、入力部12は、クラスファイルを記憶媒体から読み出して記憶部15に格納することができる。   The input unit 12 is, for example, a keyboard, a mouse, a microphone, and the like. The input unit 12 receives an input of a module update detection process start instruction and an end instruction from the user, and inputs the input to the control unit 20 and the like described later. The input unit 12 can read information from and write information to a storage medium such as a CD (Compact Disc), a DVD (Digital Versatile Disc), or a magnetic disk. For example, the input unit 12 can read the class file from the storage medium and store it in the storage unit 15.

なお、後述する表示部13も、マウスと協働してポインティングディバイス機能を実現する。表示部13は、例えば、モニタ、ディスプレイ、タッチパネルやスピーカなどであり、後述する制御部20で実施されたモジュール更新検出結果などを表示出力する。   Note that the display unit 13 described later also realizes a pointing device function in cooperation with the mouse. The display unit 13 is, for example, a monitor, a display, a touch panel, a speaker, or the like, and displays and outputs a module update detection result or the like performed by the control unit 20 described later.

記憶部15は、制御部20による各種処理に必要なデータおよびプログラムを格納するとともに、検出対象クラスファイルDB16と、抽出条件DB17と、更新前オペコード情報DB18とを有する。この検出対象クラスファイルDB16、抽出条件DB17、更新前オペコード情報DB18は、例えば、RAM(Random Access Memory)などの半導体メモリ素子やハードディスク、光ディスクなどの記憶装置である。   The storage unit 15 stores data and programs necessary for various processes performed by the control unit 20, and includes a detection target class file DB 16, an extraction condition DB 17, and a pre-update opcode information DB 18. The detection target class file DB 16, the extraction condition DB 17, and the pre-update opcode information DB 18 are, for example, a semiconductor memory element such as a RAM (Random Access Memory), or a storage device such as a hard disk or an optical disk.

検出対象クラスファイルDB16は、モジュール更新検出処理を実施するクラスファイルを記憶する。例えば、検出対象クラスファイルDB16は、図3に示すように、コンパイラーによってコンパイルされたバイナリデータであり、16進数表記でダンプされたクラスファイルを記憶する。検出対象クラスファイルDB16は、通信制御I/F部11を介して受け付けたクラスファイルを記憶してもよく、入力部12によって受け付けられた記憶媒体から読み出して記憶してもよく、記憶させる手法はどのような手法であってもよい。なお、図3は、検出対象クラスファイルDBに記憶される情報の例を示す図である。   The detection target class file DB 16 stores a class file for performing module update detection processing. For example, as shown in FIG. 3, the detection target class file DB 16 is binary data compiled by a compiler, and stores a class file dumped in hexadecimal notation. The detection target class file DB 16 may store the class file received via the communication control I / F unit 11, read out from the storage medium received by the input unit 12, and store the class file. Any method may be used. FIG. 3 is a diagram illustrating an example of information stored in the detection target class file DB.

抽出条件DB17は、制御部20の各機能部が検出対象クラスファイルDB16に記憶されるクラスファイルからオペコードを抽出する際に使用する抽出条件を記憶する。例えば、抽出条件DB17は、図4〜図7に示す各条件を記憶する。なお、図4は、抽出条件DBに記憶されるメソッド抽出の条件例を示す図であり、図5は、抽出条件DBに記憶される属性抽出の条件例を示す図である。図6は、抽出条件DBに記憶されるバイトコード抽出の条件例を示す図であり、図7は、抽出条件DBに記憶されるオペコード抽出の条件例を示す図である。   The extraction condition DB 17 stores extraction conditions used when each function unit of the control unit 20 extracts an operation code from a class file stored in the detection target class file DB 16. For example, the extraction condition DB 17 stores the conditions shown in FIGS. FIG. 4 is a diagram illustrating an example of method extraction conditions stored in the extraction condition DB, and FIG. 5 is a diagram illustrating an example of attribute extraction conditions stored in the extraction condition DB. FIG. 6 is a diagram showing an example of bytecode extraction conditions stored in the extraction condition DB, and FIG. 7 is a diagram showing an example of opcode extraction conditions stored in the extraction condition DB.

例えば、抽出条件DB17は、図4に示すように、「クラスファイル」から「メソッド」を抽出する際に、メソッド抽出部21によって使用されるメソッド抽出条件を記憶する。具体的には、抽出条件DB17は、クラスファイルに記憶される「要素」と該要素の「サイズ」を対応付けて記憶する。例えば、抽出条件DB17は、「要素、サイズ」として「マジックナンバー、4バイト」、「マイナーバージョン、2バイト」、「メジャーバージョン、2バイト」、「コンスタントプール数、2バイト」、「コンスタントプール、可変長」を記憶する。また、抽出条件DB17は、「アクセスフラグ、2バイト」、「自クラス、2バイト」、「親クラス、2バイト」、「インタフェース数、2バイト」、「インタフェース、2バイト×インタフェース数」を記憶する。また、抽出条件DB17は、「フィールド数、2バイト」、「フィールド、可変長」、「メソッド数、2バイト」、「メソッド、可変長」、「属性数、2バイト」、「属性、可変長」を記憶する。   For example, as illustrated in FIG. 4, the extraction condition DB 17 stores a method extraction condition used by the method extraction unit 21 when extracting a “method” from a “class file”. Specifically, the extraction condition DB 17 stores “element” stored in the class file in association with “size” of the element. For example, the extraction condition DB 17 includes “magic number, 4 bytes”, “minor version, 2 bytes”, “major version, 2 bytes”, “number of constant pools, 2 bytes”, “constant pool, “Variable length” is stored. The extraction condition DB 17 stores “access flag, 2 bytes”, “own class, 2 bytes”, “parent class, 2 bytes”, “number of interfaces, 2 bytes”, “interface, 2 bytes × number of interfaces”. To do. The extraction condition DB 17 includes “number of fields, 2 bytes”, “field, variable length”, “number of methods, 2 bytes”, “method, variable length”, “number of attributes, 2 bytes”, “attribute, variable length”. Is memorized.

ここで記憶されるメソッド抽出条件は、クラスファイルのどの位置にどのような情報が書き込まれているかを示す情報である。一例としては、クラスファイルの先頭から4バイト目までの位置に「マジックナンバー」が書き込まれており、マジックナンバーの次の2バイト、言い換えると、クラスファイルの5バイト目と6バイト目の位置に「マイナーバージョン」が書き込まれている。そして、メソッド抽出部21は、このようにクラスファイルの先頭からメソッド抽出条件に従って各情報を抽出していき、クラスファイル内から「メソッド数」情報と「メソッド」情報とを抽出する。   The method extraction condition stored here is information indicating what information is written at which position in the class file. As an example, the “magic number” is written in the position from the beginning of the class file to the 4th byte, and in the next 2 bytes of the magic number, in other words, in the 5th and 6th bytes of the class file. "Minor version" is written. Then, the method extraction unit 21 extracts each piece of information according to the method extraction condition from the top of the class file in this way, and extracts “number of methods” information and “method” information from the class file.

なお、マジックナンバーは、クラスファイルフォーマットを識別する情報であり、例えば0xCAFEBABEという値となる。マイナーバージョンは、クラスファイルのマイナーバージョンを示し、メジャーバージョンは、クラスファイルのメジャーバージョンを示す。コンスタントプール数とは、次に続くコンスタントプールの要素数を示し、コンスタントプールとは、インデックスによるアクセスが可能であり、クラスファイル内から参照される様々な定数を表現するための構造体テーブルを示す。アクセスフラグは、クラスやインタフェースのアクセス許可や属性を表すフラグである。   The magic number is information for identifying the class file format, and has a value of, for example, 0xCAFEBABE. The minor version indicates the minor version of the class file, and the major version indicates the major version of the class file. The number of constant pools indicates the number of elements in the following constant pool, and the constant pool is a structure table that can be accessed by an index and expresses various constants referenced from within the class file. . The access flag is a flag that represents the access permission or attribute of the class or interface.

自クラスは、自身のクラス情報を表すコンスタントプール情報のインデックスを示す情報であり、親クラスは、自身の親クラス情報を表すコンスタントプール情報のインデックスを示す情報である。インタフェース数は、実装しているインタフェースの数を示し、インタフェースは、実装しているインタフェース情報を表すコンスタントプール情報のインデックスの配列を示す。フィールド数は、クラスフィールドの数を示し、フィールドは、クラスフィールドを表す情報の配列を示す。メソッド数は、メソッドの数を示し、メソッドは、メソッドを表す情報の配列を示す。属性数は、属性の数を示し、属性は、属性を表す情報の配列を示す。   The own class is information indicating an index of constant pool information indicating its own class information, and the parent class is information indicating an index of constant pool information indicating its own parent class information. The number of interfaces indicates the number of implemented interfaces, and the interface indicates an array of constant pool information indexes representing installed interface information. The field number indicates the number of class fields, and the field indicates an array of information representing the class fields. The method number indicates the number of methods, and the method indicates an array of information representing the method. The number of attributes indicates the number of attributes, and the attribute indicates an array of information representing the attributes.

また、抽出条件DB17は、図5に示すように、「メソッド」情報から「属性」情報を抽出する際に、属性抽出部22によって使用される属性抽出条件を記憶する。具体的には、抽出条件DB17は、メソッド情報に含まれる「要素」と該要素の「サイズ」を対応付けて記憶する。例えば、抽出条件DB17は、「要素、サイズ」として「アクセスフラグ、2バイト」、「メソッド名、2バイト」、「デスクリプタ、2バイト」、「属性数、2バイト」、「属性、可変長」などと記憶する。   Further, as illustrated in FIG. 5, the extraction condition DB 17 stores attribute extraction conditions used by the attribute extraction unit 22 when extracting “attribute” information from “method” information. Specifically, the extraction condition DB 17 stores an “element” included in the method information in association with the “size” of the element. For example, the extraction condition DB 17 sets “element, size” as “access flag, 2 bytes”, “method name, 2 bytes”, “descriptor, 2 bytes”, “number of attributes, 2 bytes”, “attribute, variable length”. And remember.

ここで記憶される属性抽出条件は、クラスファイルから抽出された「メソッド」情報のどの位置に「属性」情報が書き込まれているかを示す情報である。一例としては、メソッド抽出部21により抽出されたメソッド情報の先頭から2バイト目までの位置に「アクセスフラグ」が書き込まれている。また、アクセスフラグの次の2バイト、言い換えると、メソッド情報の3バイト目と4バイト目の位置に「メソッド名」が書き込まれている。そして、属性抽出部22は、このようにメソッド情報の先頭から属性抽出条件に従って各情報を抽出していき、「メソッド」情報内から「属性」情報を抽出する。   The attribute extraction condition stored here is information indicating in which position of the “method” information extracted from the class file the “attribute” information is written. As an example, an “access flag” is written at the position from the beginning of the method information extracted by the method extraction unit 21 to the second byte. In addition, the “method name” is written in the next two bytes of the access flag, in other words, the third and fourth bytes of the method information. Then, the attribute extraction unit 22 extracts each piece of information from the top of the method information according to the attribute extraction condition, and extracts “attribute” information from the “method” information.

なお、アクセスフラグは、メソッドのアクセス許可や属性を表すマスクフラグを示し、メソッド名は、メソッド名を表すコンスタントプール情報のインデックスを示す。デスクリプリタは、メソッドディスクリプタを表すコンスタントプール情報のインデックスを示す。属性数は、属性の数を示し、属性は、メソッドの属性を表す情報の配列を示す。   The access flag indicates a mask flag indicating access permission or attribute of the method, and the method name indicates an index of constant pool information indicating the method name. The descriptor indicates an index of constant pool information representing the method descriptor. The attribute number indicates the number of attributes, and the attribute indicates an array of information indicating the attribute of the method.

また、抽出条件DB17は、図6に示すように、「属性」情報から「バイトコード」情報を抽出する際に、バイトコード抽出部23によって使用されるバイトコード抽出条件を記憶する。具体的には、抽出条件DB17は、属性情報に記憶される「要素」と該要素の「サイズ」を対応付けて記憶する。例えば、抽出条件DB17は、「要素、サイズ」として「アトリビュート名、2バイト」、「アトリビュート長さ、4バイト」、「最大スタック、2バイト」、「最大ローカル変数数、2バイト」を記憶する。また、抽出条件DB17は、「コードの長さ、4バイト」、「コード、コードの長さ」、「例外テーブル数、2バイト」、「例外テーブル、8×例外テーブル数」、「属性数、2バイト」、「属性、可変長」を記憶する。   Further, as illustrated in FIG. 6, the extraction condition DB 17 stores byte code extraction conditions used by the byte code extraction unit 23 when extracting “byte code” information from “attribute” information. Specifically, the extraction condition DB 17 stores the “element” stored in the attribute information in association with the “size” of the element. For example, the extraction condition DB 17 stores “attribute name, 2 bytes”, “attribute length, 4 bytes”, “maximum stack, 2 bytes”, “maximum number of local variables, 2 bytes” as “element, size”. . The extraction condition DB 17 includes “code length, 4 bytes”, “code, code length”, “number of exception tables, 2 bytes”, “exception table, 8 × number of exception tables”, “number of attributes, “2 bytes” and “attribute, variable length” are stored.

ここで記憶されるバイトコード抽出条件は、クラスファイルから抽出された「属性」情報のどの位置に「バイトコード」情報が書き込まれているかを示す情報である。一例としては、属性抽出部22によって抽出された属性情報の先頭から2バイト目までの位置に「アトリビュート名」が書き込まれている。また、アトリビュート名の次の4バイト、言い換えると、属性情報の3バイト目から6バイト目の位置に「アトリビュート長さ」が書き込まれている。そして、バイトコード抽出部23は、このように属性情報の先頭からバイトコード抽出条件に従って各情報を抽出していき、「属性」情報内から「バイトコード」情報を抽出する。   The byte code extraction condition stored here is information indicating in which position of the “attribute” information extracted from the class file the “byte code” information is written. As an example, “attribute name” is written at the position from the beginning of the attribute information extracted by the attribute extraction unit 22 to the second byte. In addition, the “attribute length” is written in the next 4 bytes of the attribute name, in other words, in the position of the third to sixth bytes of the attribute information. Then, the byte code extraction unit 23 extracts each piece of information according to the byte code extraction condition from the top of the attribute information as described above, and extracts “byte code” information from the “attribute” information.

なお、アトリビュート名は、文字列「Code」を表すコンスタントプール情報のインデックスを示し、アトリビュート長さは、このアトリビュート(属性)の長さを示す。最大スタックは、オペランド・スタックの最大深さを示し、最大ローカル変数数は、ローカル変数の数を示す。コードの長さは、バイトコードの長さを示し、コードは、機械語命令であるバイトコードを示す。例外テーブル数は、例外テーブルの数を示し、例外テーブルは、このメソッドが扱う例外情報の配列を示す。属性数は、属性の数を示し、属性は、CodeAttributeの属性を表す情報の配列を示す。   The attribute name indicates an index of constant pool information indicating the character string “Code”, and the attribute length indicates the length of the attribute (attribute). The maximum stack indicates the maximum depth of the operand stack, and the maximum number of local variables indicates the number of local variables. The length of the code indicates the length of the byte code, and the code indicates the byte code that is a machine language instruction. The number of exception tables indicates the number of exception tables, and the exception table indicates an array of exception information handled by this method. The attribute number indicates the number of attributes, and the attribute indicates an array of information indicating the attribute of CodeAttribute.

また、抽出条件DB17は、図7に示すように、「バイトコード」情報から「オペコード」情報を抽出する際に、オペコード抽出部24によって使用されるオペコード抽出条件を記憶する。具体的には、抽出条件DB17は、バイトコード情報に含まれる情報として、「オペコード、オペランド1、オペランド2・・・」などと記憶する。ここで記憶されるオペコード抽出条件は、クラスファイルから抽出された「バイトコード」情報のどの位置に「オペコード」情報が書き込まれているかを示す情報である。オペコード抽出部24は、この情報を用いて、「バイトコード」情報内から「オペコード」情報を抽出する。オペコードは204種類存在し、それぞれオペランドのサイズ、意味が異なるが、オペコードごとにそのサイズと意味は決まっている。このため、オペコード抽出部24は、オペコードとそのオペランドのサイズが全て把握できている状態であるオペコード抽出条件を用いることで、バイトコードを先頭から順に参照してオペコードのみを抜き出すことができる。   Further, as shown in FIG. 7, the extraction condition DB 17 stores an operation code extraction condition used by the operation code extraction unit 24 when extracting “operation code” information from “byte code” information. Specifically, the extraction condition DB 17 stores “opcode, operand1, operand2,...” As information included in the bytecode information. The operation code extraction condition stored here is information indicating in which position of the “byte code” information extracted from the class file the “opcode” information is written. Using this information, the operation code extraction unit 24 extracts “operation code” information from the “byte code” information. There are 204 types of opcodes, and the size and meaning of each operand are different, but the size and meaning are determined for each opcode. For this reason, the operation code extraction unit 24 can extract only the operation code by referring to the byte code in order from the top by using the operation code extraction condition in which the size of the operation code and its operands are all known.

図2に戻り、更新前オペコード情報DB18は、検出対象となるクラスファイルの更新前の状態から抽出したオペコードを記憶する。この更新前オペコード情報DB18で記憶されるオペコードやオペランドは、後述する制御部20の各制御部が実行されることで取得されて格納される。   Returning to FIG. 2, the pre-update opcode information DB 18 stores the opcode extracted from the pre-update state of the class file to be detected. The opcodes and operands stored in the pre-update opcode information DB 18 are acquired and stored by executing each control unit of the control unit 20 described later.

また、更新前オペコード情報DB18は、例えば、クラスファイルを特定する「識別子」と、クラスファイル内のメソッドごとに抽出した「オペコード」とを対応付けて記憶する。こうすることで、更新前オペコード情報DB18は、複数のクラスファイル各々から抽出したオペコードを一意に特定できるように記憶することができる。   Further, the pre-update opcode information DB 18 stores, for example, an “identifier” that identifies a class file and an “opcode” extracted for each method in the class file in association with each other. By doing so, the pre-update opcode information DB 18 can store the opcodes extracted from each of the plurality of class files so that they can be uniquely identified.

一例としては、更新前オペコード情報DB18は、図8に示すように、「Index、オペコード、オペランド」として「0、2A、−」、「1、B1、−」、「3、−、00」、「4、−、2E」などと記憶する。さらに、更新前オペコード情報DB18は、図8に示すように、ソースファイル内で実際に実行される行を示す有効行位置情報を記憶する。このIndexは、抽出したオペコードやオペランドを区別する項番を示す。オペコードは、CPU(Central Processing Unit)などのプロセッサの命令をビット列に置き換えたものであり、プロセッサに処理させる命令の番号を示す。オペランドは、演算が作用する対象であり、情報として利用するデータが格納されているメモリアドレスや演算結果を格納する場所等を示す。なお、図8は、更新前オペコード情報DBに記憶される情報の例を示す図である。   As an example, the pre-update opcode information DB 18 includes “0, 2A, −”, “1, B1, −”, “3, −, 00” as “Index, opcode, operand”, as shown in FIG. “4, −2E” or the like is stored. Further, the pre-update opcode information DB 18 stores valid line position information indicating lines that are actually executed in the source file, as shown in FIG. This Index indicates an item number that distinguishes the extracted opcode and operand. The operation code is obtained by replacing instructions of a processor such as a CPU (Central Processing Unit) with a bit string, and indicates an instruction number to be processed by the processor. An operand is a target on which an operation is performed, and indicates a memory address where data used as information is stored, a place where a calculation result is stored, and the like. FIG. 8 is a diagram illustrating an example of information stored in the pre-update opcode information DB.

また、更新前オペコード情報DB18は、クラスファイルのバージョンごとに、抽出したメソッド、オペコードを対応付けて記憶してもよい。例えば、更新前オペコード情報DB18は、クラスファイルを特定する「クラス識別子」、クラスファイルの更新履歴を示す「バージョン」、メソッドを識別する「メソッド識別子」、抽出した「オペコード」を対応付けて記憶する。こうすることで、モジュール更新検出装置10は、現在のクラスファイルから抽出したオペコードと、ユーザが指定する任意のバージョンのクラスファイルから抽出したオペコードとを比較することができる。この結果、開発者などは、現在のクラスファイルが任意のバージョンのクラスファイルからどの程度更新されているかを認識することができる。また、モジュール更新検出装置10は、ユーザが指定する2つの任意のバージョンのクラスファイル各々から抽出したオペコードを比較することもできる。   Further, the pre-update opcode information DB 18 may store the extracted method and opcode in association with each version of the class file. For example, the pre-update opcode information DB 18 stores a “class identifier” that identifies a class file, a “version” that indicates the update history of the class file, a “method identifier” that identifies a method, and an extracted “opcode” in association with each other. . By doing so, the module update detection apparatus 10 can compare the opcode extracted from the current class file with the opcode extracted from any version of the class file specified by the user. As a result, a developer or the like can recognize how much the current class file has been updated from an arbitrary version of the class file. Further, the module update detection apparatus 10 can also compare the operation codes extracted from each of two arbitrary version class files specified by the user.

制御部20は、例えば、ASIC(Application Specific Integrated Circuit)などの集積回路やCPUやMPU(Micro Processing Unit)などの電子回路である。この制御部20は、OS(Operating System)などの制御プログラム、各種の処理手順などを規定したプログラムおよび所要データを格納するための内部メモリを有する。さらに、制御部20は、メソッド抽出部21と属性抽出部22とバイトコード抽出部23とオペコード抽出部24と更新検出部25とを有し、これらによって各種処理を実行する。   The control unit 20 is, for example, an integrated circuit such as an ASIC (Application Specific Integrated Circuit) or an electronic circuit such as a CPU or MPU (Micro Processing Unit). The control unit 20 includes a control program such as an OS (Operating System), a program that defines various processing procedures, and an internal memory for storing necessary data. Furthermore, the control unit 20 includes a method extraction unit 21, an attribute extraction unit 22, a byte code extraction unit 23, an operation code extraction unit 24, and an update detection unit 25, and executes various processes.

メソッド抽出部21は、モジュールが更新されたJavaソースファイルをコンパイルして得られたクラスファイルからメソッド情報を抽出する。例えば、メソッド抽出部21は、入力部12等によってモジュールの更新検出処理開始指示が受け付けられると、検出対象クラスファイルDB16に記憶されるクラスファイルを読み込む。そして、メソッド抽出部21は、抽出条件DB17に記憶されるメソッド抽出条件に従って、読み込んだクラスファイルからメソッドを抽出し、抽出したメソッドを属性抽出部22に出力する。または、メソッド抽出部21は、抽出したメソッドをメモリ等に書き込む。   The method extraction unit 21 extracts method information from a class file obtained by compiling a Java source file with an updated module. For example, when the module update detection processing start instruction is received by the input unit 12 or the like, the method extraction unit 21 reads a class file stored in the detection target class file DB 16. Then, the method extraction unit 21 extracts a method from the read class file in accordance with the method extraction condition stored in the extraction condition DB 17 and outputs the extracted method to the attribute extraction unit 22. Alternatively, the method extraction unit 21 writes the extracted method in a memory or the like.

一例としては、メソッド抽出部21は、メソッド抽出条件に従って、図3に示す16進数表記のクラスファイルから「CA FE BA BE」をマジックナンバーとして抽出する。続いて、メソッド抽出部21は、「00 00」をマイナーバージョン、続く「00 31」をメジャーバージョンとして抽出する。続けて、メソッド抽出部21は、「00 37」をコンスタントプール数として抽出し、「0x0037」=「54」個の要素を有するコンスタントプールを抽出する。すなわち、メソッド抽出部21は、要素1を「07 00 02」として抽出する。このように、メソッド抽出部21は、クラスファイルのコンスタントプール数「00 37」以降から順番にコンスタントプールを抽出する。   As an example, the method extraction unit 21 extracts “CA FE BA BE” as a magic number from the class file in hexadecimal notation shown in FIG. 3 according to the method extraction condition. Subsequently, the method extraction unit 21 extracts “00 00” as the minor version and the subsequent “00 31” as the major version. Subsequently, the method extraction unit 21 extracts “00 37” as the number of constant pools, and extracts a constant pool having “0x0037” = “54” elements. That is, the method extraction unit 21 extracts the element 1 as “07 00 02”. Thus, the method extraction unit 21 extracts the constant pools in order from the number of constant pools “00 37” in the class file.

コンスタントプール数を抽出後、メソッド抽出部21は、メソッド抽出条件に従って、「アクセスフラグ」、「自クラス」、「親クラス」、「インタフェース数」、「インタフェース」、「フィールド数」、「フィールド」をクラスファイルから順番に抽出する。その後、メソッド抽出部21は、「メソッド数」をクラスファイルから抽出し、抽出されたメソッド数分の「メソッド」をクラスファイルから抽出する。   After extracting the number of constant pools, the method extraction unit 21 “access flag”, “own class”, “parent class”, “number of interfaces”, “interface”, “number of fields”, “fields” according to the method extraction condition. Are extracted in order from the class file. Thereafter, the method extraction unit 21 extracts “number of methods” from the class file, and extracts “methods” corresponding to the number of extracted methods from the class file.

例えば、メソッド抽出部21は、図9に示すように、クラスファイルから「61 2F 6C 61 6E 67 2F 4F 62 6A 65 63 74 01 00 05 63 6F 75 6E 74 01 00 01」をメソッドAとして抽出する。同様に、メソッド抽出部21は、「49 01 00 06 3C 69 6E 69 74 3E 01 00 15 28 4C 6A 61 76 61 2F 6C 61 6E 67」をメソッドBとして抽出する。同様に、メソッド抽出部21は、「2F 53 74 72 69 6E 67 3B 29 56 01 00 04 43 6F 64 65 07 00 0B 01 00 0F 6A」をメソッドCとして抽出する。そして、メソッド抽出部21は、抽出したメソッドA、B、Cを属性抽出部22に出力する。なお、図8は、クラスファイルからメソッドを抽出する例を示す図である。   For example, the method extraction unit 21 extracts “61 2F 6C 61 6E 67 2F 4F 62 6A 65 63 74 01 00 05 05 63 6F 75 6E 74 01 00 01” from the class file as shown in FIG. . Similarly, the method extraction unit 21 extracts “49 01 00 06 3C 69 6E 69 74 3E 01 00 15 28 4C 6A 61 76 61 2F 6C 61 6E 67” as the method B. Similarly, the method extraction unit 21 extracts “2F 53 74 72 69 6E 67 3B 29 56 01 00 04 43 6F 64 65 07 00 0B 01 00 0F 6A” as the method C. Then, the method extraction unit 21 outputs the extracted methods A, B, and C to the attribute extraction unit 22. FIG. 8 is a diagram illustrating an example of extracting a method from a class file.

属性抽出部22は、メソッド抽出部21により抽出されたメソッド情報からメソッド情報の属性を抽出する。例えば、属性抽出部22は、メソッド抽出部21により抽出されたメソッドA、メソッドB、メソッドCそれぞれから、抽出条件DB17に記憶される属性抽出条件に従って属性情報を抽出し、抽出した属性情報をバイトコード抽出部23に出力する。   The attribute extraction unit 22 extracts method information attributes from the method information extracted by the method extraction unit 21. For example, the attribute extraction unit 22 extracts attribute information from each of the method A, method B, and method C extracted by the method extraction unit 21 in accordance with the attribute extraction condition stored in the extraction condition DB 17, and extracts the extracted attribute information as a byte. The data is output to the code extraction unit 23.

一例としては、属性抽出部22は、メソッドB「49 01 00 06 3C 69 6E 69 74 3E 01 00 15 28 4C 6A 61 76 61 2F 6C 61 6E 67」の「49 01」をアクセスフラグとして抽出する。続いて、属性抽出部22は、アクセスフラグの次の2バイト「00 06」をメソッド名として抽出し、メソッド名の次の2バイト「3C 69」をデスクリプタとして抽出する。さらに、属性抽出部22は、デスクリプタの次の2バイト「6E 69」を属性数として抽出し、その後の「74 3E 01 00 15 28 4C 6A 61 76 61 2F 6C 61 6E 67」を属性情報として抽出する。   As an example, the attribute extraction unit 22 extracts “49 01” of the method B “49 01 00 06 3C 69 6E 69 74 3E 01 00 15 28 4C 6A 61 76 61 2F 6C 61 6E 67” as an access flag. Subsequently, the attribute extraction unit 22 extracts the next 2 bytes “00 06” of the access flag as a method name, and extracts the next 2 bytes “3C 69” of the method name as a descriptor. Further, the attribute extraction unit 22 extracts the next 2 bytes “6E 69” of the descriptor as the number of attributes, and then extracts “74 3E 01 00 15 28 4C 6A 61 76 61 2F 6C 61 6E 67” as the attribute information. To do.

バイトコード抽出部23は、属性抽出部22によって抽出された属性情報から機械語命令であるバイトコードを抽出する。例えば、バイトコード抽出部23は、属性抽出部22によって各メソッドから抽出された各属性情報から、抽出条件DB17に記憶されるバイトコード抽出条件に従ってバイトコード情報を抽出し、抽出したバイトコード情報をオペコード抽出部24に出力する。   The byte code extraction unit 23 extracts a byte code that is a machine language instruction from the attribute information extracted by the attribute extraction unit 22. For example, the byte code extraction unit 23 extracts byte code information from each attribute information extracted from each method by the attribute extraction unit 22 in accordance with the byte code extraction conditions stored in the extraction condition DB 17, and extracts the extracted byte code information. The result is output to the operation code extraction unit 24.

一例としては、バイトコード抽出部23は、メソッドBの属性情報「74 3E 01 00 15 28 4C 6A 61 76 61 2F 6C 61 6E 67」の「74 3E」をアトリビュート名として抽出する。続いて、バイトコード抽出部23は、アトリビュート名の次の4バイト「01 00 15 28」をアトリビュート長さとして抽出する。さらに続いて、バイトコード抽出部23は、アトリビュート長さの次の2バイト「4C 6A」を最大スタックとして抽出する。このように、バイトコード抽出部23は、各属性情報について、属性情報の先頭から順に、バイトコード抽出条件に従って各情報を抽出していき、バイトコード情報を抽出する。   As an example, the bytecode extraction unit 23 extracts “74 3E” of the attribute information “74 3E 01 00 15 28 4C 6A 61 76 61 2F 6C 61 6E 67” of the method B as an attribute name. Subsequently, the bytecode extraction unit 23 extracts the next 4 bytes “01 00 15 28” of the attribute name as the attribute length. Subsequently, the byte code extraction unit 23 extracts the next 2 bytes “4C 6A” of the attribute length as the maximum stack. In this way, the byte code extraction unit 23 extracts each piece of attribute information from the top of the attribute information in accordance with the byte code extraction condition in order from the top of the attribute information, and extracts the byte code information.

オペコード抽出部24は、バイトコード抽出部23によって抽出されたバイトコード情報からオペコードを抽出する。例えば、オペコード抽出部24は、バイトコード抽出部23によって各属性情報から抽出された各バイトコード情報から、抽出条件DB17に記憶されるオペコード抽出条件に従ってオペコード情報を抽出し、抽出したオペコード情報を更新検出部25に出力する。   The operation code extraction unit 24 extracts an operation code from the byte code information extracted by the byte code extraction unit 23. For example, the operation code extraction unit 24 extracts the operation code information from the byte code information extracted from the attribute information by the byte code extraction unit 23 according to the operation code extraction condition stored in the extraction condition DB 17, and updates the extracted operation code information. Output to the detector 25.

一例としては、バイトコード抽出部23によって抽出された各メソッド情報のバイトコード情報は、基本的に「オペコード、オペランド1、オペランド2」が繰り返して記載されている。これを利用して、オペコード抽出部24は、図10に示すように、「Index、オペコード、オペランド」として「0、2A、−」、「1、B4、−」、「3、−、00」、「4、−、2E」などと記憶する。さらに、更新前オペコード情報DB18は、図8に示すように、ソースファイル内で実際に実行される行を示す有効行位置情報を記憶する。なお、Index、オペコード、オペランドについては、図8と同様の情報であり、ここでは詳細な説明は省略する。図10は、メソッドからオペコードを抽出する例を示す図である。   As an example, in the byte code information of each method information extracted by the byte code extraction unit 23, “opcode, operand 1, operand 2” is basically repeatedly described. By using this, the operation code extraction unit 24, as shown in FIG. 10, "0, 2A,-", "1, B4,-", "3,-, 00" as "Index, operation code, operand". , “4, −2E”, etc. Further, the pre-update opcode information DB 18 stores valid line position information indicating lines that are actually executed in the source file, as shown in FIG. The Index, the opcode, and the operand are the same information as in FIG. 8, and detailed description thereof is omitted here. FIG. 10 is a diagram illustrating an example of extracting an operation code from a method.

更新検出部25は、バイトコード抽出部23によって抽出されたオペコードと、Javaモジュールが更新される前のクラスファイルから抽出されたオペコードとを比較して、モジュールが更新されたか否かを検出する。例えば、更新検出部25は、オペコード抽出部24によって各バイトコード情報から抽出された各オペコード情報について、Javaモジュールが更新される前のクラスファイルから抽出されたオペコードと比較する。そして、比較結果、差異が生じている場合には、更新検出部25は、更新があったと検出し、更新されたオペコードを有するメソッドを表示部13や管理コンピュータ等に出力する。   The update detection unit 25 compares the operation code extracted by the bytecode extraction unit 23 with the operation code extracted from the class file before the Java module is updated, and detects whether or not the module has been updated. For example, the update detection unit 25 compares the operation code information extracted from the byte code information by the operation code extraction unit 24 with the operation code extracted from the class file before the Java module is updated. If there is a difference as a result of the comparison, the update detection unit 25 detects that there is an update, and outputs a method having the updated operation code to the display unit 13 or the management computer.

例えば、更新検出部25は、ユーザにより指定されたバージョンのクラスファイルのオペコードを更新前オペコード情報DB18から取得する。そして、更新検出部25は、バイトコード抽出部23によって抽出されたオペコードとオペランドと有効行位置情報のうちのオペコードと、更新前オペコード情報DB18から取得したオペコードとを比較ツールなどを用いて比較する。比較結果、差異が生じている場合には、更新検出部25は、ソースファイルが更新されたと検出し、差異があるオペコードを有するメソッドを更新されたメソッドとして検出する。   For example, the update detection unit 25 acquires the operation code of the version of the class file designated by the user from the pre-update operation code information DB 18. Then, the update detection unit 25 compares the operation code extracted by the bytecode extraction unit 23, the operand, the operation code in the valid row position information, and the operation code acquired from the pre-update operation code information DB 18 using a comparison tool or the like. . If a difference is found as a result of the comparison, the update detection unit 25 detects that the source file has been updated, and detects a method having an operation code having a difference as an updated method.

一例として、更新検出部25は、更新前のオペコード情報である図8と、更新後のオペコード情報である図10とを比較した場合、「Index=1」の値が更新前「B1」であり、更新後「B4」となっていることから、更新ありを検出する。   As an example, when the update detection unit 25 compares the operation code information before update in FIG. 8 with FIG. 10 as the operation code information after update, the value of “Index = 1” is “B1” before update. Since it is “B4” after the update, an update is detected.

[処理の流れ]
次に、図11を用いて、実施例2に係るモジュール更新検出装置における処理の流れを説明する。図11は、実施例2に係るモジュール更新検出装置における処理の流れを示すフローチャートである。
[Process flow]
Next, the flow of processing in the module update detection apparatus according to the second embodiment will be described with reference to FIG. FIG. 11 is a flowchart illustrating the flow of processing in the module update detection apparatus according to the second embodiment.

図11に示すように、モジュール更新検出装置10のメソッド抽出部21は、入力部12等によってモジュールの更新検出処理開始指示を受け付ける(ステップS101)。続いて、メソッド抽出部21は、検出対象クラスファイルDB16に記憶されるクラスファイルを1ファイル読み込む(ステップS102)。   As illustrated in FIG. 11, the method extraction unit 21 of the module update detection apparatus 10 receives a module update detection process start instruction via the input unit 12 or the like (step S <b> 101). Subsequently, the method extraction unit 21 reads one class file stored in the detection target class file DB 16 (step S102).

続いて、メソッド抽出部21は、抽出条件DB17に記憶されるメソッド抽出条件に従って、読み込んだクラスファイルからメソッドを抽出する(ステップS103)。そして、属性抽出部22は、メソッド抽出部21により抽出されたメソッド情報を1つ読み込み、読み込んだメソッド情報から抽出条件DB17に記憶される属性抽出条件に従ってメソッド情報の属性を抽出する(ステップS104)。   Subsequently, the method extraction unit 21 extracts a method from the read class file in accordance with the method extraction condition stored in the extraction condition DB 17 (step S103). Then, the attribute extraction unit 22 reads one method information extracted by the method extraction unit 21, and extracts the attribute of the method information from the read method information according to the attribute extraction condition stored in the extraction condition DB 17 (step S104). .

続いて、バイトコード抽出部23は、属性抽出部22によって抽出された属性から、抽出条件DB17に記憶されるバイトコード抽出条件に従ってバイトコードを抽出する(ステップS105)。続いて、オペコード抽出部24は、バイトコード抽出部23によって抽出されたバイトコード情報から、抽出条件DB17に記憶されるオペコード抽出条件に従ってオペコード情報を抽出する(ステップS106)。   Subsequently, the byte code extraction unit 23 extracts a byte code from the attribute extracted by the attribute extraction unit 22 in accordance with the byte code extraction condition stored in the extraction condition DB 17 (step S105). Subsequently, the operation code extraction unit 24 extracts operation code information from the byte code information extracted by the byte code extraction unit 23 in accordance with the operation code extraction condition stored in the extraction condition DB 17 (step S106).

その後、更新検出部25は、バイトコード抽出部23によって抽出されたオペコードと、Javaモジュールが更新される前のクラスファイルから抽出されたオペコードとを比較する(ステップS107)。比較した結果、差異がある場合には(ステップS108肯定)、更新検出部25は、対象のメソッドは更新されたと検出する(ステップS109)。一方、比較した結果、差異がない場合には(ステップS109否定)、更新検出部25は、対象のメソッドは更新されていないと検出する(ステップS110)。   Thereafter, the update detection unit 25 compares the operation code extracted by the bytecode extraction unit 23 with the operation code extracted from the class file before the Java module is updated (step S107). As a result of the comparison, if there is a difference (Yes at Step S108), the update detection unit 25 detects that the target method has been updated (Step S109). On the other hand, if there is no difference as a result of the comparison (No at Step S109), the update detection unit 25 detects that the target method has not been updated (Step S110).

そして、更新検出部25は、クラスファイルの全てのメソッドについてステップS104からステップS110までの処理を実行した場合には(ステップS111肯定)、ステップS112の処理を実行する。その後、更新検出部25は、更新検出対象のクラスファイルについてステップS102からステップS111までの処理を実行した場合には(ステップS112肯定)、処理を終了する。   And the update detection part 25 performs the process of step S112, when the process from step S104 to step S110 is performed about all the methods of a class file (step S111 affirmation). Thereafter, when the process from step S102 to step S111 is executed for the class file subject to update detection (Yes at step S112), the update detection unit 25 ends the process.

一方、ステップS104からステップS110までの処理を実行していないメソッドが存在する場合には(ステップS111否定)、モジュール更新検出装置10は、ステップS104以降の処理を実行する。また、ステップS102からステップS111までの処理を実行していないクラスファイルが存在する場合には(ステップS112否定)、モジュール更新検出装置10は、ステップS102以降の処理を実行する。   On the other hand, when there is a method that does not execute the processes from step S104 to step S110 (No at step S111), the module update detection apparatus 10 executes the processes after step S104. If there is a class file that has not been subjected to the processing from step S102 to step S111 (No at step S112), the module update detection apparatus 10 executes the processing after step S102.

[実施例2による効果]
このように、実施例2に係るモジュール更新検出装置10は、メソッドが変更された場合に変更されるオペコードのみを比較対象として抽出する。この結果、実施例2に係るモジュール更新検出装置10は、更新前後のモジュールのソースファイルを比較することなく、コンパイルで得られた更新前後のクラスファイルを比較することで、更新されたメソッドを特定することが可能である。また、モジュール更新検出装置10は、他のメソッドが変更された場合など他からの影響を受けるオペランドについては比較対象から除外するので、無駄な比較処理を省略することができ、効率的な比較処理を実施でき、更新検出を高速に実行できる。
[Effects of Example 2]
Thus, the module update detection apparatus 10 according to the second embodiment extracts only the operation code that is changed when the method is changed as a comparison target. As a result, the module update detection apparatus 10 according to the second embodiment identifies the updated method by comparing the class files before and after the update obtained by compiling without comparing the source files of the modules before and after the update. Is possible. Further, the module update detection apparatus 10 excludes operands that are affected by others, such as when other methods are changed, from being compared, so that unnecessary comparison processing can be omitted, and efficient comparison processing can be performed. The update detection can be executed at high speed.

また、ソースファイル自体を用いず、コンパイル後のクラスファイルから更新を検出できるので、ソースファイルが無い状況であっても、モジュール(メソッド)の更新を確認することができる。また、クラスファイルよりも容量が大きいソースファイルを保持しておく必要もないので、メモリを有効的に活用することができる。   In addition, since the update can be detected from the compiled class file without using the source file itself, the update of the module (method) can be confirmed even in a situation where there is no source file. In addition, since it is not necessary to hold a source file having a larger capacity than the class file, the memory can be used effectively.

さて、これまで本発明の実施例について説明したが、本発明は上述した実施例以外にも、種々の異なる形態にて実施されてよいものである。そこで、以下に異なる実施例を説明する。   Although the embodiments of the present invention have been described so far, the present invention may be implemented in various different forms other than the embodiments described above. Therefore, different embodiments will be described below.

(比較手法)
例えば、実施例2に係るモジュール更新検出装置10は、更新前のクラスファイルから抽出したオペコードと、更新後のクラスファイルから抽出されたオペコードとを比較ツールなどを用いて比較する例について説明したが、これに限定されるものではない。一例としては、モジュール更新検出装置10は、更新前のクラスファイルから抽出したオペコードのハッシュ値と、更新後のクラスファイルから抽出されたオペコードのハッシュ値とを比較して、更新されたか否かを検出することもできる。また、各オペコードのハッシュ値を算出する手法については、一般的なハッシュ関数を用いることができる。
(Comparison method)
For example, the module update detection apparatus 10 according to the second embodiment has described the example in which the operation code extracted from the class file before update and the operation code extracted from the class file after update are compared using a comparison tool or the like. However, the present invention is not limited to this. As an example, the module update detection apparatus 10 compares the hash value of the opcode extracted from the class file before the update with the hash value of the opcode extracted from the class file after the update to determine whether or not the update has been performed. It can also be detected. A general hash function can be used as a method for calculating the hash value of each operation code.

一例としては、モジュール更新検出装置10は、更新後のクラスファイルから抽出した全てのオペコードを組み合わせた一つのデータを生成し、生成したデータでハッシュ関数を使って計算することで、ハッシュ値を算出する。同様に、モジュール更新検出装置10は、更新前のクラスファイルから抽出した全てのオペコードを組み合わせた一つのデータを生成し、生成したデータでハッシュ関数を使って計算することで、ハッシュ値を算出する。そして、モジュール更新検出装置10は、両方のハッシュ値が一致している場合には更新なしと検出し、両方のハッシュ値が一致していない場合には更新ありと検出する。こうすることで、複雑で膨大なソースファイルから得られた膨大なオペコードを比較する場合であっても、効率的に比較することができる。   As an example, the module update detection device 10 generates a hash value by generating one data combining all the operation codes extracted from the updated class file and calculating the generated data using a hash function. To do. Similarly, the module update detection apparatus 10 generates one data combining all the operation codes extracted from the class file before the update, and calculates a hash value by calculating the generated data using a hash function. . The module update detection apparatus 10 detects that there is no update when both hash values match, and detects that there is an update when both hash values do not match. By doing so, even when comparing a large number of operation codes obtained from a complicated and huge number of source files, it is possible to compare efficiently.

(対象プログラム)
例えば、実施例2では、更新検出対象として、Javaソースファイルを例にして説明したが、これに限定されるものではない。例えば、コンパイル後のバイナリデータのどの位置にどのような情報が書き込まれているかを判断できる場合には、どのような言語のソースファイルも実施例1や2と同様の手法で、更新を検出することができる。
(Target program)
For example, in the second embodiment, a Java source file has been described as an example of an update detection target. However, the present invention is not limited to this. For example, when it is possible to determine what information is written at which position in the compiled binary data, the update is detected in the source file of any language by the same method as in the first and second embodiments. be able to.

また、実施例1や2では、オペコードのみを比較対象として更新があったか否かを検出する例について説明したが、これに限定されるものではない。例えば、更新前のオフセットを記憶しておくことで、オペランド自体が変更されたのか、他からの影響によってオペランドが変更されたのかを検出する。その結果、オペランドを用いた比較手法であっても、メソッドが更新されたか否かを検出することができる。   In the first and second embodiments, the example has been described in which it is detected whether or not there is an update using only the operation code as a comparison target. However, the present invention is not limited to this. For example, by storing the offset before update, it is detected whether the operand itself has been changed or whether the operand has been changed due to the influence of others. As a result, it is possible to detect whether or not the method has been updated even with a comparison method using operands.

(システム構成等)
また、本実施例において説明した各処理のうち、自動的におこなわれるものとして説明した処理の全部または一部を手動的におこなうこともできる。あるいは、例えば処理開始指示受信など手動的におこなわれるものとして説明した処理の全部または一部を公知の方法で自動的におこなうこともできる。この他、上記文書中や図面中で示した処理手順、制御手順、具体的名称、例えば図3〜図8等に示した各種のデータやパラメータを含む情報については、特記する場合を除いて任意に変更することができる。
(System configuration etc.)
In addition, among the processes described in the present embodiment, all or a part of the processes described as being automatically performed can be manually performed. Alternatively, for example, all or part of the processing described as being performed manually such as reception of a processing start instruction can be automatically performed by a known method. In addition, the processing procedures, control procedures, and specific names shown in the above-mentioned documents and drawings, for example, information including various data and parameters shown in FIGS. 3 to 8 etc. are optional unless otherwise specified. Can be changed.

また、図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、例えばメソッド抽出部21と属性抽出部22とを統合するなど各装置の分散・統合の具体的形態は図示のものに限られない。また、各装置の全部または一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的または物理的に分散・統合して構成することができる。さらに、各装置にて行なわれる各処理機能は、その全部または任意の一部が、CPUおよび当該CPUにて解析実行されるプログラムにて実現され、あるいは、ワイヤードロジックによるハードウェアとして実現され得る。   Further, each component of each illustrated apparatus is functionally conceptual, and does not necessarily need to be physically configured as illustrated. That is, the specific form of distribution / integration of each device, for example, integrating the method extraction unit 21 and the attribute extraction unit 22 is not limited to that shown in the figure. In addition, all or a part of each device can be configured to be functionally or physically distributed / integrated in arbitrary units according to various loads or usage conditions. Further, all or any part of each processing function performed in each device may be realized by a CPU and a program analyzed and executed by the CPU, or may be realized as hardware by wired logic.

(プログラム)
ところで、上記の実施例で説明した各種の処理は、あらかじめ用意されたプログラムをパーソナルコンピュータやワークステーションなどのコンピュータシステムで実行することによって実現することができる。そこで、以下では、上記の実施例と同様の機能を有するプログラムを実行するコンピュータシステムの一例を説明する。
(program)
By the way, the various processes described in the above embodiments can be realized by executing a program prepared in advance on a computer system such as a personal computer or a workstation. Therefore, in the following, an example of a computer system that executes a program having the same function as in the above embodiment will be described.

図12は、モジュール更新検出プログラムを実行するコンピュータシステムの例を示す図である。図12に示すように、コンピュータシステム100は、RAM101と、HDD102と、ROM(Read Only Memory)103と、CPU104とを有する。ここで、ROM103には、上の実施例と同様の機能を発揮するプログラムがあらかじめ記憶されている。つまり、図12に示すように、ROM103には、メソッド抽出プログラム103a、属性抽出プログラム103b、バイトコード抽出プログラム103cがあらかじめ記憶されている。また、ROM103には、オペコード抽出プログラム103d、更新検出プログラム103eがあらかじめ記憶されている。   FIG. 12 is a diagram illustrating an example of a computer system that executes a module update detection program. As illustrated in FIG. 12, the computer system 100 includes a RAM 101, an HDD 102, a ROM (Read Only Memory) 103, and a CPU 104. Here, the ROM 103 stores in advance a program that exhibits the same function as in the above embodiment. That is, as shown in FIG. 12, the ROM 103 stores a method extraction program 103a, an attribute extraction program 103b, and a byte code extraction program 103c in advance. The ROM 103 stores an operation code extraction program 103d and an update detection program 103e in advance.

そして、CPU104には、これらのプログラム103a〜103eを読み出して実行することで、図12に示すように、各プロセスとなる。つまり、プログラム103a〜103e各々は、メソッド抽出プロセス104a、属性抽出プロセス104b、バイトコード抽出プロセス104c、オペコード抽出プロセス104d、更新検出プロセス104eとなる。なお、メソッド抽出プロセス104aは、図2に示したメソッド抽出部21に対応し、同様に、属性抽出プロセス104bは、属性抽出部22に対応し、バイトコード抽出プロセス104cは、バイトコード抽出部23に対応する。また、オペコード抽出プロセス104dは、図2に示したオペコード抽出部24に対応し、更新検出プロセス104eは、更新検出部25に対応する。   Then, the CPU 104 reads out and executes these programs 103a to 103e, thereby forming each process as shown in FIG. That is, each of the programs 103a to 103e is a method extraction process 104a, an attribute extraction process 104b, a byte code extraction process 104c, an operation code extraction process 104d, and an update detection process 104e. The method extraction process 104a corresponds to the method extraction unit 21 shown in FIG. 2, similarly, the attribute extraction process 104b corresponds to the attribute extraction unit 22, and the byte code extraction process 104c corresponds to the byte code extraction unit 23. Corresponding to The operation code extraction process 104d corresponds to the operation code extraction unit 24 illustrated in FIG. 2, and the update detection process 104e corresponds to the update detection unit 25.

また、HDD102には、検出対象クラスファイルテーブル102aと、抽出条件テーブル102bと、更新前オペコード情報テーブル102cとが設けられる。検出対象クラスファイルテーブル102aは、図2に示した検出対象クラスファイルDB16に対応し、抽出条件テーブル102bは、抽出条件DB17に対応し、更新前オペコード情報テーブル102cは、更新前オペコード情報DB18に対応する。   Further, the HDD 102 is provided with a detection target class file table 102a, an extraction condition table 102b, and a pre-update opcode information table 102c. The detection target class file table 102a corresponds to the detection target class file DB 16 shown in FIG. 2, the extraction condition table 102b corresponds to the extraction condition DB 17, and the pre-update operation code information table 102c corresponds to the pre-update operation code information DB 18. To do.

ところで、上記したプログラム103a〜103eは、必ずしもROM103に記憶させておく必要はない。例えば、プログラム103a〜103eは、コンピュータシステム100に挿入されるフレキシブルディスク(FD)、CD−ROM、DVDディスク、光磁気ディスク、ICカードなどの「可搬用の物理媒体」に記憶させておくようにしてもよい。また、コンピュータシステム100の内外に備えられるハードディスクドライブ(HDD)などの「固定用の物理媒体」に記憶させておいてもよい。さらに、公衆回線、インターネット、LAN(Local Area Network)、WAN(Wide Area Network)などを介してコンピュータシステム100に接続される「他のコンピュータシステム」に記憶させておいてもよい。そして、コンピュータシステム100がこれらからプログラムを読み出して実行するようにしてもよい。   By the way, the above-described programs 103 a to 103 e are not necessarily stored in the ROM 103. For example, the programs 103a to 103e are stored in a “portable physical medium” such as a flexible disk (FD), a CD-ROM, a DVD disk, a magneto-optical disk, or an IC card inserted into the computer system 100. May be. Further, it may be stored in a “fixed physical medium” such as a hard disk drive (HDD) provided inside or outside the computer system 100. Further, it may be stored in “another computer system” connected to the computer system 100 via a public line, the Internet, a LAN (Local Area Network), a WAN (Wide Area Network), or the like. Then, the computer system 100 may read the program from these and execute it.

すなわち、この他の実施例でいうプログラムは、上記した「可搬用の物理媒体」、「固定用の物理媒体」、「通信媒体」などの記録媒体に、コンピュータ読み取り可能に記録されるものである。そして、コンピュータシステム100は、このような記録媒体からプログラムを読み出して実行することで上記した実施例と同様の機能を実現する。なお、この他の実施例でいうプログラムは、コンピュータシステム100によって実行されることに限定されるものではない。例えば、他のコンピュータシステムまたはサーバがプログラムを実行する場合や、これらが協働してプログラムを実行するような場合にも、本発明を同様に適用することができる。   That is, the program referred to in the other embodiments is recorded in a computer-readable manner on a recording medium such as the above-mentioned “portable physical medium”, “fixed physical medium”, “communication medium”, and the like. . Then, the computer system 100 realizes the same function as the above-described embodiment by reading and executing the program from such a recording medium. The program referred to in the other embodiments is not limited to being executed by the computer system 100. For example, the present invention can be similarly applied to a case where another computer system or server executes a program or a case where these programs cooperate to execute a program.

1 モジュール更新検出装置
1a 操作抽出部
1b 命令抽出部
1c コード抽出部
1d 更新検出部
2 コンパイル後のバイナリデータ
3 更新検出結果
10 モジュール更新検出装置
11 通信制御I/F部
12 入力部
13 表示部
15 記憶部
16 検出対象クラスファイルDB
17 抽出条件DB
18 更新前オペコード情報DB
20 制御部
21 メソッド抽出部
22 属性抽出部
23 バイトコード抽出部
24 オペコード抽出部
25 更新検出部
DESCRIPTION OF SYMBOLS 1 Module update detection apparatus 1a Operation extraction part 1b Instruction extraction part 1c Code extraction part 1d Update detection part 2 Compiled binary data 3 Update detection result 10 Module update detection apparatus 11 Communication control I / F part 12 Input part 13 Display part 15 Storage unit 16 Detection target class file DB
17 Extraction condition DB
18 Pre-update opcode information DB
DESCRIPTION OF SYMBOLS 20 Control part 21 Method extraction part 22 Attribute extraction part 23 Byte code extraction part 24 Opcode extraction part 25 Update detection part

Claims (6)

モジュールが更新されたソースファイルをコンパイルして得られたバイナリデータから該バイナリデータによって実行される操作情報を抽出する操作抽出手順と、
前記操作抽出手順により抽出された操作情報から機械語命令を抽出する命令抽出手順と、
前記命令抽出手順によって抽出された機械語命令からオペコードを抽出するコード抽出手順と、
前記コード抽出手順によって抽出されたオペコードと、前記モジュールが更新される前のソースファイルをコンパイルして得られたバイナリデータから抽出されたオペコードとを比較して、前記モジュールが更新されたか否かを検出する更新検出手順と
をコンピュータに実行させることを特徴とするモジュール更新検出プログラム。
An operation extraction procedure for extracting operation information executed by the binary data from the binary data obtained by compiling the updated source file of the module;
An instruction extraction procedure for extracting a machine language instruction from the operation information extracted by the operation extraction procedure;
A code extraction procedure for extracting an operation code from the machine language instruction extracted by the instruction extraction procedure;
Whether the module is updated by comparing the opcode extracted by the code extraction procedure with the opcode extracted from binary data obtained by compiling the source file before the module is updated. A module update detection program which causes a computer to execute an update detection procedure to be detected.
前記更新検出手順は、前記コード抽出手順によって抽出されたオペコードのハッシュ値と、前記更新される前のバイナリデータから抽出されたオペコードのハッシュ値とを比較して、前記モジュールが更新されたか否かを検出することを特徴とする請求項1に記載のモジュール更新検出プログラム。   Whether the module is updated by comparing the hash value of the operation code extracted by the code extraction procedure with the hash value of the operation code extracted from the binary data before being updated, in the update detection procedure The module update detection program according to claim 1, wherein the module update detection program is detected. モジュールが更新されたソースファイルをコンパイルして得られたバイナリデータから該バイナリデータによって実行される操作情報を抽出する操作抽出工程と、
前記操作抽出工程により抽出された操作情報から機械語命令を抽出する命令抽出工程と、
前記命令抽出工程によって抽出された機械語命令からオペコードを抽出するコード抽出工程と、
前記コード抽出工程によって抽出されたオペコードと、前記モジュールが更新される前のソースファイルをコンパイルして得られたバイナリデータから抽出されたオペコードとを比較して、前記モジュールが更新されたか否かを検出する更新検出工程と
を含んだことを特徴とするモジュール更新検出方法。
An operation extraction step of extracting operation information executed by the binary data from the binary data obtained by compiling the source file with the updated module;
An instruction extraction step of extracting a machine language instruction from the operation information extracted by the operation extraction step;
A code extraction step of extracting an operation code from the machine language instruction extracted by the instruction extraction step;
It is determined whether or not the module is updated by comparing the opcode extracted in the code extraction step with the opcode extracted from binary data obtained by compiling the source file before the module is updated. A module update detection method comprising: an update detection step for detecting.
前記更新検出工程は、前記コード抽出工程によって抽出されたオペコードのハッシュ値と、前記更新される前のバイナリデータから抽出されたオペコードのハッシュ値とを比較して、前記モジュールが更新されたか否かを検出することを特徴とする請求項3に記載のモジュール更新検出方法。   Whether the module is updated by comparing the hash value of the operation code extracted by the code extraction step with the hash value of the operation code extracted from the binary data before being updated, in the update detection step The module update detection method according to claim 3, wherein the module update is detected. モジュールが更新される前のソースファイルをコンパイルして得られたバイナリデータから抽出したオペコードを記憶するコード記憶部と、
前記モジュールが更新されたソースファイルをコンパイルして得られたバイナリデータから該バイナリデータによって実行される操作情報を抽出する操作抽出部と、
前記操作抽出部により抽出された操作情報から機械語命令を抽出する命令抽出部と、
前記命令抽出部によって抽出された機械語命令からオペコードを抽出するコード抽出部と、
前記コード抽出部によって抽出されたオペコードと、前記コード記憶部に記憶されるオペコードとを比較して、前記モジュールが更新されたか否かを検出する更新検出部と
を有することを特徴とするモジュール更新検出装置。
A code storage unit for storing an operation code extracted from binary data obtained by compiling a source file before the module is updated;
An operation extraction unit that extracts operation information executed by the binary data from binary data obtained by compiling the updated source file of the module;
An instruction extraction unit for extracting a machine language instruction from the operation information extracted by the operation extraction unit;
A code extraction unit that extracts an operation code from the machine language instruction extracted by the instruction extraction unit;
An update detection unit that detects whether the module has been updated by comparing the operation code extracted by the code extraction unit with an operation code stored in the code storage unit. Detection device.
前記更新検出部は、前記コード抽出部によって抽出されたオペコードのハッシュ値と、前記コード記憶部に記憶されるオペコードのハッシュ値とを比較して、前記モジュールが更新されたか否かを検出することを特徴とする請求項5に記載のモジュール更新検出装置。   The update detection unit detects whether the module has been updated by comparing the hash value of the operation code extracted by the code extraction unit and the hash value of the operation code stored in the code storage unit. The module update detection apparatus according to claim 5.
JP2010001581A 2010-01-06 2010-01-06 Module update detection program, module update detection method, and module update detection apparatus Expired - Fee Related JP5273057B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010001581A JP5273057B2 (en) 2010-01-06 2010-01-06 Module update detection program, module update detection method, and module update detection apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010001581A JP5273057B2 (en) 2010-01-06 2010-01-06 Module update detection program, module update detection method, and module update detection apparatus

Publications (2)

Publication Number Publication Date
JP2011141702A JP2011141702A (en) 2011-07-21
JP5273057B2 true JP5273057B2 (en) 2013-08-28

Family

ID=44457501

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010001581A Expired - Fee Related JP5273057B2 (en) 2010-01-06 2010-01-06 Module update detection program, module update detection method, and module update detection apparatus

Country Status (1)

Country Link
JP (1) JP5273057B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023123111A1 (en) * 2021-12-29 2023-07-06 华为技术有限公司 Compiling method and compiling apparatus

Also Published As

Publication number Publication date
JP2011141702A (en) 2011-07-21

Similar Documents

Publication Publication Date Title
CN105446723B (en) Method and apparatus for identifying the semantic differential between source code version
JP5992622B2 (en) Malicious application diagnostic apparatus and method
CN104679495B (en) software identification method and device
EP3218811B1 (en) Testing insecure computing environments using random data sets generated from characterizations of real data sets
US8931092B2 (en) System and method for computer inspection of information objects for shared malware components
WO2015101097A1 (en) Method and device for feature extraction
US9202021B2 (en) License verification method and apparatus, and computer readable storage medium storing program therefor
KR102006245B1 (en) Method and system for identifying an open source software package based on binary files
CA2816781C (en) Identifying client states
US11036479B2 (en) Devices, systems, and methods of program identification, isolation, and profile attachment
KR20190080445A (en) Whitelist construction method for analyzing malicious code, computer readable medium and device for performing the method
JP6244992B2 (en) Configuration information management program, configuration information management method, and configuration information management apparatus
US10409572B2 (en) Compiled file normalization
JP7314243B2 (en) How to Generate Malicious Behavior Feature Information for Malware
US9298694B2 (en) Generating a regular expression for entity extraction
US9984065B2 (en) Optimizing generation of a regular expression
US8359592B2 (en) Identifying groups and subgroups
JP5273057B2 (en) Module update detection program, module update detection method, and module update detection apparatus
CN116880847A (en) Source tracing method and device based on open source project, electronic equipment and storage medium
KR101534493B1 (en) Source code security weakness detection apparatus and method based on structure conversion
Choi et al. Chracer: Memory analysis of Chromium-based browsers
JP5578625B2 (en) Program analysis apparatus, program analysis method, and program
KR101673151B1 (en) Method and Apparatus for Analyzing Relationship Change of Program Source and DB Schema
JP2010170438A (en) Document management system
CN113641363B (en) Third-party library detection method and device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120910

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130411

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130416

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130429

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 5273057

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees