[webkit-changes] cvs commit: WebCore/khtml/misc main_thread_malloc.cpp

Beth bdakin at opensource.apple.com
Fri Sep 2 11:08:30 PDT 2005


bdakin      05/09/02 11:08:30

  Modified:    .        ChangeLog
               kjs      fast_malloc.cpp
               .        ChangeLog
               khtml/misc main_thread_malloc.cpp
  Log:
  
  
  Revision  Changes    Path
  1.813     +15 -0     JavaScriptCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/ChangeLog,v
  retrieving revision 1.812
  retrieving revision 1.813
  diff -u -r1.812 -r1.813
  --- ChangeLog	31 Aug 2005 18:36:44 -0000	1.812
  +++ ChangeLog	2 Sep 2005 18:08:28 -0000	1.813
  @@ -1,3 +1,18 @@
  +2005-09-02  Beth Dakin  <bdakin at apple.com>
  +
  +        Fix for <rdar://problem/4235531> Denver Regression: Safari crash in KWQStringData::makeUnicode
  +	The other half of the fix is in WebCore.
  +
  +	Fix written by Maciej and Darin.
  +	Reviewed by me/Maciej
  +
  +	As Maciej said in Radar: These problems was caused by a conflict between some of our custom 
  +	allocators, causing them to return null. Symptom is typically a null pointer dereference in 
  +	a place where it might be expected an allocation has just occurred.
  +
  +        * kjs/fast_malloc.cpp: 	Added #define for MORECORE_CONTIGUOUS, MORECORE_CANNOT_TRIM, 
  +				and MALLOC_FAILURE_ACTION.
  +
   2005-08-31  Geoffrey Garen  <ggaren at apple.com>
   
           -rolled in fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=4698
  
  
  
  1.3       +10 -0     JavaScriptCore/kjs/fast_malloc.cpp
  
  Index: fast_malloc.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/fast_malloc.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- fast_malloc.cpp	17 Aug 2005 01:00:00 -0000	1.2
  +++ fast_malloc.cpp	2 Sep 2005 18:08:28 -0000	1.3
  @@ -226,6 +226,10 @@
   
   #include "fast_malloc.h"
   
  +#define MORECORE_CONTIGUOUS 0
  +#define MORECORE_CANNOT_TRIM 1
  +#define MALLOC_FAILURE_ACTION abort()
  +
   namespace KJS {
   
   #ifndef NDEBUG
  @@ -2526,7 +2530,9 @@
   
   #if __STD_C
   static Void_t*  sYSMALLOc(INTERNAL_SIZE_T, mstate);
  +#ifndef MORECORE_CANNOT_TRIM
   static int      sYSTRIm(size_t, mstate);
  +#endif
   static void     malloc_consolidate(mstate);
   static Void_t** iALLOc(size_t, size_t*, int, Void_t**);
   #else
  @@ -3316,6 +3322,8 @@
     returns 1 if it actually released any memory, else 0.
   */
   
  +#ifndef MORECORE_CANNOT_TRIM
  +
   #if __STD_C
   static int sYSTRIm(size_t pad, mstate av)
   #else
  @@ -3373,6 +3381,8 @@
     return 0;
   }
   
  +#endif
  +
   /*
     ------------------------------ malloc ------------------------------
   */
  
  
  
  1.79      +15 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- ChangeLog	2 Sep 2005 16:47:24 -0000	1.78
  +++ ChangeLog	2 Sep 2005 18:08:29 -0000	1.79
  @@ -1,3 +1,18 @@
  +2005-09-02  Beth Dakin  <bdakin at apple.com>
  +
  +        Fix for <rdar://problem/4235531> Denver Regression: Safari crash in KWQStringData::makeUnicode
  +	The other half of the fix is in JavaScriptCore
  +
  +	Fix written by Maciej and Darin.
  +	Reviewed by me/Maciej
  +
  +	As Maciej said in Radar: These problems was caused by a conflict between some of our custom 
  +	allocators, causing them to return null. Symptom is typically a null pointer dereference in 
  +	a place where it might be expected an allocation has just occurred.
  +
  +        * khtml/misc/main_thread_malloc.cpp: Added #define for MORECORE_CONTIGUOUS, MORECORE_CANNOT_TRIM, 
  +					and MALLOC_FAILURE_ACTION. 
  +
   2005-09-02  Darin Adler  <darin at apple.com>
   
           - added back a test now that Vicki fixed it so it no longer crashes
  
  
  
  1.3       +11 -0     WebCore/khtml/misc/main_thread_malloc.cpp
  
  Index: main_thread_malloc.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/misc/main_thread_malloc.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- main_thread_malloc.cpp	17 Aug 2005 01:07:25 -0000	1.2
  +++ main_thread_malloc.cpp	2 Sep 2005 18:08:29 -0000	1.3
  @@ -226,6 +226,11 @@
   
   #include "main_thread_malloc.h"
   
  +#define MORECORE_CONTIGUOUS 0
  +#define MORECORE_CANNOT_TRIM 1
  +#define MALLOC_FAILURE_ACTION abort()
  +
  +
   namespace khtml {
   
   #ifndef NDEBUG
  @@ -2526,7 +2531,9 @@
   
   #if __STD_C
   static Void_t*  sYSMALLOc(INTERNAL_SIZE_T, mstate);
  +#ifndef MORECORE_CANNOT_TRIM
   static int      sYSTRIm(size_t, mstate);
  +#endif
   static void     malloc_consolidate(mstate);
   static Void_t** iALLOc(size_t, size_t*, int, Void_t**);
   #else
  @@ -3316,6 +3323,8 @@
     returns 1 if it actually released any memory, else 0.
   */
   
  +#ifndef MORECORE_CANNOT_TRIM
  +
   #if __STD_C
   static int sYSTRIm(size_t pad, mstate av)
   #else
  @@ -3373,6 +3382,8 @@
     return 0;
   }
   
  +#endif
  +
   /*
     ------------------------------ malloc ------------------------------
   */
  
  
  



More information about the webkit-changes mailing list