[OpenMP] Check output of malloc in the device for debug

A common problem is the device running out of global heap memory and
crashing due to a nullptr dereference when using the data sharing stack.
This explicitly checks that a nullptr was not returned by malloc when
debugging field 1 is enabled.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D112005

GitOrigin-RevId: 6dd791bca858c0d5241689c9eefd9313fe823ee3
2 files changed