On 11/03/2013 03:33 AM, safety0ff wrote:
Realloc currently has the following issues:
- If realloc is passed an interior pointer and a size parameter of zero,
then realloc inherits the above issue from free, additionally, it always
returns as if success.
- If realloc is passed a pointer to non-GC memory with non-zero size, it
will allocate a new GC owned block when it should do nothing (and
possibly return as if error.)
- Same as above except with interior pointer, this is an issue for
shrinking allocations (similar to free issue,) whereas for expansion it
is not a big deal (but proper behaviour should be documented specifically.)


Most of these are sound like either implementation or documentation bugs. Please file them in bugzilla http://d.puremagic.com/issues/. Generally we can't force implementations to provide checks that are possibly expensive to implement. So it might be more appropriate to disallow using non-GC pointer with the GC, but this needs some more thought.

Reply via email to