![]() |
|
Message-ID: <FAAF3894-0230-4BEE-BC46-10551D446F28@inria.fr>
Date: Fri, 27 Jun 2025 07:47:20 +0200
From: Jens Gustedt <jens.gustedt@...ia.fr>
To: musl@...ts.openwall.com
Subject: Re: Re: alx-0029r5 - Restore the traditional realloc(3) specification
Alex,
sorry to came in late, with a may-be simplifying idea.
Wouldn't it be easier just to describe realloc as follows?
- do malloc with the size
- if that fails, return a null pointer
- otherwise
- copy the initial part into the new storage instance
- call free
- return the new pointer
only that the old and new pointers may be the same.
That would make it clear that the two storage instances
are considered to be different (we need that for the provenance model)
and are just accidentally located at the same address
Jens
--
Jens Gustedt - INRIA & ICube, Strasbourg, France
Content of type "text/html" skipped
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.