check whether the program is correct in compilation and linkage.
(&self, program_path: &Path)
| 39 | |
| 40 | /// check whether the program is correct in compilation and linkage. |
| 41 | fn is_program_link_correct(&self, program_path: &Path) -> Result<Option<ProgramError>> { |
| 42 | let time_logger = TimeUsage::new(get_file_dirname(program_path)); |
| 43 | remove_duplicate_definition(program_path)?; |
| 44 | let mut binary_out = PathBuf::from(program_path); |
| 45 | binary_out.set_extension("out"); |
| 46 | |
| 47 | let res = self.compile(vec![program_path], &binary_out, super::Compile::FUZZER); |
| 48 | time_logger.log("link")?; |
| 49 | |
| 50 | if let Err(err) = res { |
| 51 | let err_msg = err.to_string(); |
| 52 | return Ok(Some(ProgramError::Link(err_msg))); |
| 53 | } |
| 54 | Ok(None) |
| 55 | } |
| 56 | |
| 57 | /// linked with AddressSanitizer, execute it to check whether code is correct. |
| 58 | fn is_program_execute_correct(&self, program_path: &Path) -> Result<Option<ProgramError>> { |
no test coverage detected