[Webkit-unassigned] [Bug 29026] CRASH: fastRealloc crashes on realloc(ptr, 0)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Sep 11 12:48:24 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=29026
Alexey Proskuryakov <ap at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS/Version|Mac OS X 10.5 |All
Platform|PC |All
CC| |ap at webkit.org
--- Comment #7 from Alexey Proskuryakov <ap at webkit.org> 2009-09-11 12:48:21 PDT ---
I agree that fastRealloc should have the same semantics as realloc, or be
renamed. However, I'm not sure which specification you're citing, as the
behavior is different per Mac OS X man page:
"If ptr is NULL, realloc() is identical to a call to malloc() for size bytes.
If size is zero and ptr is not NULL, a new, minimum sized object is allocated
and the original object is freed."
As a result, the behavior of realloc(0, 0) is implementation defined, but
realloc(nonNull, 0) doesn't return 0 unless minimum sized object allocation
fails.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list