diff --git a/CHANGELOG.md b/CHANGELOG.md index e0f34ee90..ed13c6370 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Zowe Common C Changelog +## `2.18.1` +- Bugfix: IARV64 results must be checked for 0x7FFFF000 (#474) + ## `2.18.0` - Minor `components.zss.logLevels._zss.httpserver=5` debug messages enhancement (#471) diff --git a/c/alloc.c b/c/alloc.c index 33742901a..b75b2fecf 100644 --- a/c/alloc.c +++ b/c/alloc.c @@ -181,7 +181,12 @@ static char* __ptr64 getmain64(long long sizeInMegabytes, int *returnCode, int * if (returnCode) *returnCode = macroRetCode; if (reasonCode) *reasonCode = macroResCode; - + + // IARV64 returns 0x7FFFF000 when MEMLIMIT is reached + if (data == (void *)0x7FFFF000) { + data = NULL; + } + return data; } @@ -202,7 +207,12 @@ static char* __ptr64 getmain64ByToken(long long sizeInMegabytes, long long token if (returnCode) *returnCode = macroRetCode; if (reasonCode) *reasonCode = macroResCode; - + + // IARV64 returns 0x7FFFF000 when MEMLIMIT is reached + if (data == (void *)0x7FFFF000) { + data = NULL; + } + return data; }