Commit Graph
46 Commits
Author SHA1 Message Date
Gervase Markham cb6a072c2a Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Jeff Muizelaar b15ac22046 Bug 719427. Add a comment about malloc_logger. r=espindola 2012-03-27 13:48:58 -04:00
Ehsan Akhgari c5900f6899 Bug 737959 - Fix the startup crash with MallocStackLogging; r=bsmedberg 2012-03-22 13:18:36 -04:00
Jeff Muizelaar 905a5cadfc Bug 732806. Make stackwalking respect the stack end on OS X. r=ehsan
This will help us avoid some crashes.
2012-02-15 00:17:34 -05:00
Ehsan Akhgari 8bb9044ac3 Bug 733264 - Define FramePointerStackWalk on platforms where stackwalking is not supported; r=jrmuizel 2012-03-06 11:38:04 -05:00
Cameron McCormack f298a21a8d Bug 732664 - Use FormatMessageA so that XPCOM stack walker prints error message correctly. r=dbaron 2012-03-06 10:04:40 +11:00
Masatoshi Kimura 3a5286efbe Bug 699247 - Remove Win2K related code. r=jimm, sr=neil 2012-02-23 08:53:55 -06:00
Jeff Muizelaar 8afa35bccf Bug 724079. Add an internal stackwalk API. r=ehsan
This will be used by the profiler to be able to unwind arbitrary threads.
2012-02-03 15:13:24 -05:00
Ed Morley 8086dffedb Backout f1acc52a59da (bug 719983) & 6771bd53e267 (bug 699247) for 30% WinXp Ts regression 2012-02-08 21:04:21 +00:00
Masatoshi Kimura 89dc26a595 Bug 699247 - Say goodbye to Win2k related code. r=jimm, sr=neil 2012-02-08 10:00:45 -06:00
Ehsan Akhgari 43505a6afd Bug 718032 - Make stackwalking for other threads cheaper on Windows by avoiding involving a third walker thread; r=jrmuizel 2012-01-26 11:57:23 -05:00
Vladan Djeric e3d530c851 Bug 716590 - WalkStackMain64 shouldn't skip frames unless it's walking the thread that called NS_StackWalk. r=dbaron 2012-01-23 17:21:23 -05:00
Ehsan Akhgari b8bca9ed9c Bug 713278 - Teach NS_StackWalk to walk the stack of other threads too on Windows; r=dbaron 2011-12-23 18:14:09 -05:00
Rafael Ávila de Espíndola d804a343b5 Bug 708031 - refactor the ifdefs in nsStackWalk.cpp. r=dbaron. 2011-12-22 11:00:48 -05:00
Javi Rueda 5534167e4f Bug 379342 - Remove Win95/Win98 support code in XPCom; r=bsmedberg a=removal 2011-12-13 14:17:58 +00:00
Rafael Ávila de Espíndola 488a865799 Bug 707648 - Only try to init the critical range if we are able to walk the stack. r=ehsan. 2011-12-06 14:26:49 -05:00
Rafael Ávila de Espíndola 59b41e200e Bug 696376 - Change how we find critical ranges so that it works on 10.6 too. r=dbaron.
Currently we use dlsym on pthread_cond_wait$UNIX2003 to find a
function that indicates that new_sem_from_pool is on the stack. This
works on 10.5, but on 10.6 I could not find a single reliable
indicator that would work with dlsym.

The good news is that dladdr works with any symbol, not just exported
ones. To find the address of new_sem_from_pool, we set up a malloc logger
and force a call to new_sem_from_pool. From the logger callback we walk
the stack trying dladdr on every address.

To force a call to new_sem_from_pool, the initialization code has to be the
first to use semaphores, so it is now run from NS_LogInit.

This works on 10.6 and 10.5 (but we have to look for
"pthread_cond_wait$UNIX2003"). In 10.7 the call to malloc is gone, so we don't
have to worry about critical addresses on it anymore.
2011-12-02 19:26:04 -05:00
Chris Lord a73ea11cf3 Backout bug 696376
This broke building on android due to requiring a newer version of unwind.h.
2011-12-02 18:00:58 +00:00
Rafael Ávila de Espíndola b644e77f68 Bug 696376 - Change how we find critical ranges so that it works on 10.6 too. r=dbaron.
Currently we use dlsym on pthread_cond_wait$UNIX2003 to find a
function that indicates that new_sem_from_pool is on the stack. This
works on 10.5, but on 10.6 I could not find a single reliable
indicator that would work with dlsym.

The good news is that dladdr works with any symbol, not just exported
ones. To find the address of new_sem_from_pool, we set up a malloc logger
and force a call to new_sem_from_pool. From the logger callback we walk
the stack trying dladdr on every address.

To for a call to new_sem_from_pool, the initialization code has to be the
first to use semaphores, so it is now run from NS_LogInit.

This works on 10.6 and 10.5 (but we have to look for
"pthread_cond_wait$UNIX2003"). In 10.7 the call to malloc is gone, so we don't
have to worry about critical addresses on it anymore.
2011-12-01 18:22:00 -05:00
Ehsan Akhgari 478ad1a412 Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron
Landing on a CLOSED TREE
2011-10-17 10:59:28 -04:00
Jeff Walden 7d613942b0 Bug 693469 - Implement mozilla::ArrayLength and mozilla::ArrayEnd, and replace uses of NS_ARRAY_LENGTH whenever possible. (Exceptions: assigning to static initializers, use in static assertions, as template parameters, etc. These will go away when the relevant compilers have C++11 constexpr support.) r=cjones 2011-10-10 22:50:08 -07:00
Jeff Walden c5e5f873d1 Back out everything since 5435ee09cf7b. Tinderbox compilers hate me. r=epic-fail 2011-10-12 12:21:53 -07:00
Jeff Walden 946f2ae0e3 Bug 639469 - Implement mozilla::ArrayLength and mozilla::ArrayEnd, and replace uses of NS_ARRAY_LENGTH whenever possible. r=cjones 2011-10-10 22:50:08 -07:00
Michael Wu 0fe7772ece Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones 2011-09-28 23:19:26 -07:00
Ed Morley 49398a0b56 Bug 652506 - Remove WinCE code from xpcom; r=bsmedberg 2011-05-01 20:59:24 +02:00
Jory A. Pratt bf641887a2 Bug 593911 - Check for dlopen in the libc too. r=khuey a=bsmedberg 2010-11-05 18:26:51 +01:00
Jacek Caban 5179e6c1b0 Bug 569586 - XPCOM compilation failure on mingw-w64 due to pointer to int cast loosing precision. r=benjamin 2010-06-25 14:02:24 +02:00
Ehsan Akhgari 506349bb1f Bug 560647 - add startup timeline instrumentation; r=vlad 2010-05-19 19:22:19 -04:00
Makoto Kato ea75bd7da1 Bug 475229 - xpcom/base/nsStackWalk support for Windows x64. r=benjamin 2009-03-22 12:53:47 +09:00
Robert O'Callahan a7eacba780 Bug 478195 - '[Mac] Same-thread deadlock with trace-malloc (causing random red on OS X 10.5.2 mozilla-central leak test build)'. r=dbaron. 2009-02-17 21:11:29 -08:00
Brad Lassey 8da2d3932d Bug 455381 - WinCE XPCOM Explicit Unicode API Calls, Wide Char CheckVersion Function r=bsmedberg 2008-12-03 08:41:12 -05:00
93911c201a Bug 417903. Don't crash if _SymGetLineFromAddr64 fails. r=benjamin,a=beltzner 2008-02-24 17:16:41 -08:00
9bd0e605df And actually get the right bug number. b=415426 (which is what the previous checkin was for as well) 2008-02-03 11:59:07 -08:00
67b3f5aa8e Switch back to evil casts, which are the only solution that works across SDK version. b=415252 2008-02-03 11:51:14 -08:00
88957760b5 Match new (more-const) signature for PENUMLOADED_MODULES_CALLBACK and PENUMLOADED_MODULES_CALLBACK64. b=415426 Fixing bustage on Windows tinderbox from SDK upgrade. 2008-02-03 11:34:31 -08:00
67b344b9ac Bug 326594 - Consider using backtrace() for Unix stack traces: Add safety checks to i386/ppc unwind and use libgcc_s for amd64 and others r=dbaron,bsmedberg a=schrep 2007-11-11 20:45:40 -08:00
15963e2b0e Back out a small part of bug 391848 to fix bustage for some people (and add a comment warning about the problem). 2007-08-27 22:42:25 -07:00
52d3b86e81 Do stack walking on a single thread to avoid deadlocks during thread creation. b=391321 [email protected] [email protected] (delegated by bsmedberg) [email protected] 2007-08-27 22:42:04 -07:00
b25c3a2365 Allow builds compiled with VC8 to function with older versions of dbghelp.dll. b=391848 r+a=bsmedberg 2007-08-19 14:38:31 -07:00
16cac9ec49 Debugging code and cleanup from fixing Windows stack traces to work on VC8-compiled builds in addition to VC7.1-compiled builds. b=391848 r=bsmedberg a=bzbarsky 2007-08-19 14:37:55 -07:00
8d6760e523 Enable Linux stack walking code on Mac OS X. b=336517 r+a=bsmedberg 2007-08-15 17:03:29 -07:00
d13d421ec4 Include file name and line number in Windows stack traces. b=391850 r+a=bsmedberg 2007-08-14 09:34:32 -07:00
a3ef32d11a Merge nsStackFrameWin and nsStackFrameUnix into nsStackWalk. b=391793 r+a=bsmedberg 2007-08-13 12:37:36 -07:00
21952d5e17 Convert trace-malloc to using XPCOM stack walking API. b=374829 r+a=brendan 2007-08-10 15:20:48 -07:00
095d5bc328 Split the address->symbol mapping from the rest of the stack walking code. b=374829 r=bsmedberg a=bzbarsky 2007-08-10 14:29:37 -07:00
c3789f1c16 Export a stack walking API (usable from C or C++) from XPCOM. b=374689 r=bsmedberg a=bzbarsky 2007-08-10 14:28:22 -07:00