Check for presence of ".version" instead of ".address_size" (which is optional)

This commit is contained in:
Andrzej Janik
2021-06-27 14:58:36 +02:00
parent d7d38256e0
commit e89b0c5d9c

View File

@ -156,8 +156,8 @@ unsafe fn record_module_image_raw(module: CUmodule, raw_image: *const ::std::os:
}
unsafe fn record_module_image(module: CUmodule, image: &str) {
if !image.contains(&".address_size") {
os_log!("Malformed module image: {:?}", module)
if !image.contains(&".version") {
os_log!("Malformed module image: {:?}", module);
} else {
let mut errors = Vec::new();
let ast = ptx::ModuleParser::new().parse(&mut errors, image);