Mozilla crash and burn?

Alexander Leidinger Alexander at Leidinger.net
Tue Mar 23 06:38:21 PST 2004


On Tue, 23 Mar 2004 09:03:48 -0500
Joe Marcus Clarke <marcus at FreeBSD.org> wrote:

> Me, either.  Mozilla works just fine for me.  I've never seen any of the
> crashes you describe.  The URLs you mentioned above work fine for me (I
> go to GnomeDesktop a lot).  I'm running -CURRENT from yesterday with all
> debugging disabled.  Perhaps this is something triggered by WITNESS...

- no kernel debugging (so no WITNESS...)
- malloc.conf -> aj
- sched ule
- CFLAGS=-Os -pipe -fno-strict-aliasing
- COPTFLAGS=-Os -pipe
- CPUTYPE=athlon
- WANT_COMPAT4_STDIO=YES
- libmap: libc_r -> libpthread

In the mean time I've set a breakpoint and noticed that the env lock
doesn't get initialized. I changed nsprpub/pr/src/misc/prenv.c and are
now compiling again... if someone with a faster machine (this is a 1 GHz
Athlon-XP) wants to test it, the patch is attached.

Bye,
Alexander.

-- 
           I will be available to get hired in April 2004.

http://www.Leidinger.net                       Alexander @ Leidinger.net
  GPG fingerprint = C518 BC70 E67F 143F BE91  3365 79E2 9C60 B006 3FE7
-------------- next part --------------
--- ./nsprpub/pr/src/misc/prenv.c.orig	Fri Mar 15 00:21:00 2002
+++ ./nsprpub/pr/src/misc/prenv.c	Tue Mar 23 14:42:11 2004
@@ -36,26 +36,12 @@
 #include "primpl.h"
 
 /* Lock used to lock the environment */
-#if defined(_PR_NO_PREEMPT)
-#define _PR_NEW_LOCK_ENV()
-#define _PR_DELETE_LOCK_ENV()
-#define _PR_LOCK_ENV()
-#define _PR_UNLOCK_ENV()
-#elif defined(_PR_LOCAL_THREADS_ONLY)
-extern _PRCPU * _pr_primordialCPU;
-static PRIntn _is;
-#define _PR_NEW_LOCK_ENV()
-#define _PR_DELETE_LOCK_ENV()
-#define _PR_LOCK_ENV() if (_pr_primordialCPU) _PR_INTSOFF(_is);
-#define _PR_UNLOCK_ENV() if (_pr_primordialCPU) _PR_INTSON(_is);
-#else
 static PRLock *_pr_envLock = NULL;
-#define _PR_NEW_LOCK_ENV() {_pr_envLock = PR_NewLock();}
+#define _PR_NEW_LOCK_ENV() {_pr_envLock = PR_NewLock(); PR_ASSERT(NULL != _pr_envLock);}
 #define _PR_DELETE_LOCK_ENV() \
     { if (_pr_envLock) { PR_DestroyLock(_pr_envLock); _pr_envLock = NULL; } }
-#define _PR_LOCK_ENV() { if (_pr_envLock) PR_Lock(_pr_envLock); }
-#define _PR_UNLOCK_ENV() { if (_pr_envLock) PR_Unlock(_pr_envLock); }
-#endif
+#define _PR_LOCK_ENV() { if (!_pr_envLock) _PR_NEW_LOCK_ENV(); PR_Lock(_pr_envLock); }
+#define _PR_UNLOCK_ENV() { PR_ASSERT(NULL != _pr_envLock); PR_Unlock(_pr_envLock); }
 
 /************************************************************************/
 


More information about the freebsd-gnome mailing list