rfm
6667842dd5
Update FSF address as requested by Gregory
2024-11-07 13:37:59 +00:00
rfm
4ad8d6ba38
Avoid compiler warning
2024-06-21 11:45:38 +01:00
rfm
6011b3c528
Protect bfd symbol lookup for thread safety
2024-05-07 11:24:26 +01:00
rfm
c0b9ba8992
Possible fox for #319
2024-02-12 06:10:44 +00:00
Richard Frith-Macdonald
10f86fed2d
revert stupid change
2023-01-24 14:09:53 +00:00
Richard Frith-Macdonald
35a763f3cb
Aim to improve thread safety of stacktrace generation.
2023-01-24 11:35:14 +00:00
Frederik Seiffert
27c06a9209
Fix various incorrect format string types
2021-08-11 19:32:21 +02:00
Frederik Seiffert
5a46f744df
Fix incorrect string format in NSException
2021-08-11 19:32:21 +02:00
Frederik Seiffert
abfe4e2a04
Use native threading and locking APIs on Windows
...
Removes dependency on pthread library and uses fast Slim Reader/Writer (SRW) locks for NSLock/NSRecursiveLock/NSCondition/NSConditionLock as well as all internal locks. Adds GS_MUTEX_*() macros in GSPThread.h, that are being used for all internal locking instead of pthread APIs.
Also adds support for thread priorities on Windows, fixes method signature of +[NSThread setThreadPriority:] to match Apple platforms, and adds error handling in same method.
2021-07-29 14:22:27 +02:00
Richard Frith-Macdonald
b489f9b82b
Changes to detect that bfd_get_section_vma has changed to bfd_section_vma and make corresponding changes so we can support use of binutils 2.34 and later.
2021-03-18 21:35:34 +00:00
Richard Frith-Macdonald
4e61056743
The code in GSPrivateReturnAddresses() and the -symbols method must have ifdefs in matching order so that setup of the information from the stack matches the code used to generate the corresponding symbols.
2021-03-18 20:17:35 +00:00
Frederik Seiffert
61709e6101
Support building on Windows with Clang MSVC target
2021-02-03 15:02:27 +01:00
Richard Frith-Macdonald
1b7bf26bea
Merge changes for NSURLSession from EngageHub (formerly Brainstorm).
2020-11-29 06:57:47 -05:00
Riccardo Mottola
24261fdc45
explicitely allow disabling unwind, test for header and function too
2020-07-28 01:02:55 +02:00
Richard Frith-Macdonald
2e07244f8e
Updates to move towards ARC
2020-02-08 16:42:17 +00:00
Gregory John Casamento
753c907938
Fix address for FSF and License name in all headers in base
2019-12-09 18:36:00 -05:00
rmottola
cbad92f8a8
minor fix to get Windos compiling again
2019-12-05 11:07:40 +01:00
Frederik Seiffert
0eedef5080
Added NSException symbolication support using libunwind.
...
This is used when backtrace() is unavailable.
2019-11-18 10:47:47 +01:00
Richard Frith-Macdonald
3b1324d73d
Add GSExceptionStackTrace user default setting
2018-06-12 16:43:15 +01:00
Richard Frith-Macdonald
b88e69dceb
improve -symbols method on platform without backtrace symbols support
2018-04-13 07:11:15 +01:00
David Chisnall
7bf1179f60
Reapply 3b1e94ec5d
correctly
...
This time without accidentally-included files...
If compiling without backtrace or BFD support, we initialise the
location to store return addresses incorrectly, leaving a dangling
pointer which we then right over.
Most consumers never read this, so it seemed to work most of the time by
just overwriting a random bit of memory.
This probably has security implications, because throwing an exception
can clobber random bits of memory, though not with attacker-controlled
data.
2018-04-07 20:04:14 +01:00
David Chisnall
970c8cbd05
Revert "Fix memory corruption in NSException."
...
Accidentally included unrelated changes.
This reverts commit 3b1e94ec5d
.
2018-04-07 20:03:33 +01:00
David Chisnall
3b1e94ec5d
Fix memory corruption in NSException.
...
If compiling without backtrace or BFD support, we initialise the
location to store return addresses incorrectly, leaving a dangling
pointer which we then right over.
Most consumers never read this, so it seemed to work most of the time by
just overwriting a random bit of memory.
This probably has security implications, because throwing an exception
can clobber random bits of memory, though not with attacker-controlled
data.
2018-04-07 11:02:04 +01:00
Richard Frith-Macdonald
603c3b1103
indicate trace by use of subclass rather than flag
2018-04-04 12:58:06 +01:00
Richard Frith-Macdonald
437df42b87
Bugfix for getting stacktrace
2018-03-30 10:43:27 +01:00
Richard Frith-Macdonald
b2f821bb36
make lock tracing safer
2018-03-28 09:28:56 +01:00
Richard Frith-Macdonald
ebfe915619
Fixups for stack handling
2018-03-27 07:06:17 +01:00
Richard Frith-Macdonald
2d3039694f
Stack tyrace generation optimisation
2018-03-26 14:49:13 +01:00
Richard Frith-Macdonald
d8e7607582
Tweaks to let comp[iler know that methods to raise an exception don't return.
2018-01-25 10:05:52 +00:00
Richard Frith-MacDonald
9592363863
msys 64bit tweaks
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39933 72102866-910b-0410-8b05-ffd578937521
2016-06-27 19:06:12 +00:00
Richard Frith-MacDonald
f5288bdf6b
Simplify bfd code
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39763 72102866-910b-0410-8b05-ffd578937521
2016-05-14 14:47:43 +00:00
Richard Frith-MacDonald
6e18501b77
stack trace tweaks
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39529 72102866-910b-0410-8b05-ffd578937521
2016-03-11 16:48:31 +00:00
Richard Frith-MacDonald
62d2bcbabc
changes for use of _WIN32 define on windows
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39492 72102866-910b-0410-8b05-ffd578937521
2016-03-09 13:16:16 +00:00
Riccardo Mottola
5d0ac374e4
Openbsd malloc.h warning fix.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37368 72102866-910b-0410-8b05-ffd578937521
2013-11-07 14:41:58 +00:00
Eric Wasylishen
f1cf2f888f
* Source/NSException.m:
...
* Headers/Foundation/NSThread.h: Add trivial implementation of
+[NSThread callStackSymbols] that uses GSStackTrace.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37249 72102866-910b-0410-8b05-ffd578937521
2013-10-18 02:00:54 +00:00
Richard Frith-MacDonald
54ff9b7de5
static analyzer tweaks
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36523 72102866-910b-0410-8b05-ffd578937521
2013-04-14 09:04:40 +00:00
Fred Kiefer
bb4c52dfff
* Source/NSException.m (-raise): Only set the stack when the
...
exception gets first raised. This fixes bug #35192
Patch by Larry Campbell <lcampbel@akamai.com>
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34398 72102866-910b-0410-8b05-ffd578937521
2012-01-03 09:34:10 +00:00
David Chisnall
7764740bdc
Make -drain and -release in NSAutoreleasePool do the same thing (rather than one calling the other) in non-GC mode.
...
Replace all -release messages sent to autorelease pools with -drain. In non-GC mode, these are equivalent. In GC mode, these trigger a collection.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33143 72102866-910b-0410-8b05-ffd578937521
2011-05-27 11:48:44 +00:00
Richard Frith-MacDonald
d18e29dde8
avoid compiler warnings
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32417 72102866-910b-0410-8b05-ffd578937521
2011-02-28 19:49:57 +00:00
Richard Frith-MacDonald
474a12b708
minor cleanups
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32234 72102866-910b-0410-8b05-ffd578937521
2011-02-19 19:42:42 +00:00
Richard Frith-MacDonald
27550994ee
use the _() macro for localisation within base
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32173 72102866-910b-0410-8b05-ffd578937521
2011-02-15 06:25:54 +00:00
Richard Frith-MacDonald
bc34d0505f
Minor cleanups.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32031 72102866-910b-0410-8b05-ffd578937521
2011-02-10 10:52:54 +00:00
Nicola Pero
30f098f9f8
Updated code to compile with GCC 4.6 and the new GNU Objective-C runtime
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31765 72102866-910b-0410-8b05-ffd578937521
2010-12-23 02:23:05 +00:00
David Chisnall
e8e94cfcfb
Fix build with libobjc2.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30967 72102866-910b-0410-8b05-ffd578937521
2010-07-15 09:59:01 +00:00
Richard Frith-MacDonald
23b7ff95cd
Simplify source by usuing autoconf
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30692 72102866-910b-0410-8b05-ffd578937521
2010-06-12 07:19:26 +00:00
Richard Frith-MacDonald
f784646663
generalize define from __MINGW32__ to __MINGW__
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30001 72102866-910b-0410-8b05-ffd578937521
2010-03-19 12:10:11 +00:00
Richard Frith-MacDonald
ddffb6eec3
include malloc.h for alloc() on platforms where it isn't in alloca.h
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29971 72102866-910b-0410-8b05-ffd578937521
2010-03-16 06:11:00 +00:00
Richard Frith-MacDonald
9dfc6b7a26
check for use of uninitialized exception
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29936 72102866-910b-0410-8b05-ffd578937521
2010-03-14 05:37:49 +00:00
Richard Frith-MacDonald
ee25a8f059
improve exception support
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29898 72102866-910b-0410-8b05-ffd578937521
2010-03-11 07:22:10 +00:00
Richard Frith-MacDonald
9364b39deb
revrt archiving changes
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29877 72102866-910b-0410-8b05-ffd578937521
2010-03-08 12:07:11 +00:00