Gencoding icon indicating copy to clipboard operation
Gencoding copied to clipboard

Serious error in code implementation: causing problems in ACFG topology structure and this paper experiment result will not effective

Open YuanBoXie opened this issue 2 years ago • 1 comments

This code implementation has a lot of dead code that is not used for experiments, but it's not important. I have an important finding that there is a serious error in the code implementation of this article, which will lead to serious problems in the topology of the ACFG extracted by the ACFG feature extraction code. This problem is caused by the wrong code implemented in the function def getCfg(func, externs_eas, ea_externs): of cfg_constructor.py .

               if ref in control_blocks:
				dst_node = control_blocks[ref]
				if dst_node not in visited:
					visited[dst_node] = len(cfg)
				dst_id = visited[dst_node]
				cfg.add_edge(dst_id, src_id)
				cfg.node[dst_id]['label'] = dst_node

When there are several dst_nodes that is not visited before more than once, this part of the code will label these dst_nodes to the same label. This will have a serious impact on the topology of ACFG.

YuanBoXie avatar Jan 11 '23 02:01 YuanBoXie

This code implementation has a lot of dead code that is not used for experiments, but it's not important. I have an important finding that there is a serious error in the code implementation of this article, which will lead to serious problems in the topology of the ACFG extracted by the ACFG feature extraction code. This problem is caused by the wrong code implemented in the function def getCfg(func, externs_eas, ea_externs): of cfg_constructor.py .

               if ref in control_blocks:
				dst_node = control_blocks[ref]
				if dst_node not in visited:
					visited[dst_node] = len(cfg)
				dst_id = visited[dst_node]
				cfg.add_edge(dst_id, src_id)
				cfg.node[dst_id]['label'] = dst_node

When there are several dst_nodes that is not visited before more than once, this part of the code will label these dst_nodes to the same label. This will have a serious impact on the topology of ACFG.

Hi, I realized the same problem while processing the dataset. Do you have any suggested solutions or fixes for this issue? I would greatly appreciate your thoughts and guidance on this matter.

pigeoner avatar Nov 12 '23 13:11 pigeoner