Thanks. That was beginning to be my suspicion.

Again, yes, I know that referencing the freed cell is a bad idea/flaw/bug. I
am trying to figure out why my code does not behave as I would guess it
would, given the mistake that I know/think I have made. You know how
debugging is -- a search for the truth in a collection of incomplete
evidence. And the answer is that the cell does not contain my data any more.

Thanks again,
        
Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On
Behalf Of Jim Mulder
Sent: Tuesday, November 18, 2014 7:18 PM
To: [email protected]
Subject: Re: Does CPOOL use the first few bytes of a free cell for its own
purposes?

> I am trying to shoot a bug. I *know* I have a design/logic error in 
> that
I
> am referencing a cell *after* returning it with CPOOL FREE. But I am
trying
> to figure out if I have another error also. Does anyone know: does 
> CPOOL FREE use the first four or so bytes of a cell for its own 
> purposes
following
> FREE? In other words, does CPOOL FREE clobber the first few bytes of a
cell?
> Maybe with a cell or related address?
> 
>          CPOOL BUILD,PCELLCT=(R2),SCELLCT=(R4),                        +
>                CSIZE=(R3),SP=SP_ToUse,KEY=0,                           +
>                LOC=(31,31),CPID=AV_Cell_Recd,                          +
>                MF=(E,CPOOLMFL)
> 
>          CPOOL FREE,CPID=AV_Cell_Recd,CELL=(R8),REGS=USE

  The first 4 bytes of a freed cell contains the address of the next cell on
the available cell chain.

  The next 12 bytes after that may also get modified by CPOOL FREE if you
are using the undocumented DIAGxx TRAP which searches the available chain to
see if the cell you are trying to free is already freed. 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email
to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to