[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gm2] Protential library error in Storage.mod
From: |
Gaius Mulley |
Subject: |
Re: [Gm2] Protential library error in Storage.mod |
Date: |
Tue, 17 Feb 2015 15:42:54 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Michael Riedl <address@hidden> writes:
> Hallo Gaius,
>
> I encountered a small issue with the ALLOCATE / DEALLOCATE routines.
>
> I get the impression that
>
> PROCEDURE DEALLOCATE (VAR addr: SYSTEM.ADDRESS; amount: CARDINAL) ;
> BEGIN
> IF VerifyDeallocate (addr, amount) THEN
> free (addr);
> END;
> END DEALLOCATE ;
>
> does not set addr to NIL as I would expect. Perhaps it might be an idea
> to add an explicit "addr:=NIL;" statement after the call to "free".
> Reading the malloc/free man pages did not give me a clear idea how libc
> should handle that ...
Hi Michael,
quite correct - yes a bug - thanks. I've fixed this and will push it
up to the git repository,
regards,
Gaius