This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On Fri, 2 Jan 2004, Ian Lance Taylor wrote:
Although I initially believed otherwise, I now think that it is possible to write a reasonable program which may be miscompiled if gcc thinks that realloc has the malloc attribute. Whether such a program actually exists in practice, I don't know. Whether such a program strictly conforms to the C standard, I don't know.
Should we really consider such a program more reasonable than the sort of
program accessing freed memory, which certainly exists in practice?
glibc has had the attribute on realloc for four years (stdlib/stdlib.h
version 1.80), plenty of time for any miscompilation problems with such
code to show up.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |