Skip to content

Commit

Permalink
Merge pull request #448 from zowe/bugfix/bad-cellpool-logic-in-recovery
Browse files Browse the repository at this point in the history
Fix an incorrect check in the recovery router (v2)
  • Loading branch information
JoeNemo authored May 22, 2024
2 parents 292082a + 1ecbdb4 commit 041d803
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## `2.17.0`
- Fixed `xplatform.loadFileUTF8` when trying to open nonexistent file (#454)
- Bugfix: fix an incorrect check in the recovery router code which might lead to
the state cell-pool being released prematurely (#446)

## `2.16.0`
- No yaml value converted to null (#442)
Expand Down
6 changes: 5 additions & 1 deletion c/recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,14 +497,16 @@ static void * __ptr32 getRecoveryRouterAddress() {
" LA 1,RCVXINF LOAD ROUTER SERVICE INFO \n"
" BRAS 14,RCVSIFLB RECORD IT, REMOVE CONTEXT, PERCOLATE \n"
" TM RCXFLAG1,R@CF1USP USER STATE POOL? \n"
" BZ RCVFRL04 NO, DO NOT FREE IT \n"
" BNZ RCVFRL04 NO, DO NOT FREE IT \n"
" LT 2,RCXSCPID CELL POOL ZERO? \n"
" BZ RCVFRL04 YES, DO NOT FREE IT \n"
#ifdef _LP64
" SAM31 \n"
" SYSSTATE AMODE64=NO \n"
#endif
" CPOOL DELETE,CPID=(2) FREE THE STATE CELL POOL \n"
" LGFI 2,X'7FFFFBA3' MAKE AN OBVIOUSLY BAD ADDRESS \n"
" ST 2,RCXSCPID MARK THE CPID FOR DEBUGGING PURPOSES \n"
#ifdef _LP64
" SAM64 \n"
" SYSSTATE AMODE64=YES \n"
Expand Down Expand Up @@ -1291,6 +1293,8 @@ RecoveryStatePool *recoveryMakeStatePool(unsigned int stateCount) {

void recoveryRemoveStatePool(RecoveryStatePool *statePool) {
removeRecoveryStatePool(statePool->cellPool);
// put a bad address for debugging (in case the statePool storage survives)
statePool->cellPool = 0x7FFFFBA1;
storageRelease(statePool, sizeof(RecoveryStatePool));
}

Expand Down

0 comments on commit 041d803

Please sign in to comment.