Skip to content

Commit 3f5a700

Browse files
authored
[smoke] Fixes potential nullptr deref (#1531)
When disabling OMPT support this test will crash with a segementation fault. With this fix the test will still fail but no longer seg fault.
1 parent 27dfad7 commit 3f5a700

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

test/smoke/aomp-issue376/aomp-issue376.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ int main()
3434
}
3535
}
3636

37+
if (!DeviceMapPtr)
38+
return 0;
39+
3740
for (auto Dev : *DeviceMapPtr)
3841
flush_trace(Dev);
3942

@@ -42,8 +45,3 @@ int main()
4245

4346
/// CHECK: Callback Target
4447
/// CHECK-SAME: device_num=0
45-
46-
47-
48-
49-

0 commit comments

Comments
 (0)