Skip to content

Commit

Permalink
ref: Remove unused zombie crash monitor (#2782)
Browse files Browse the repository at this point in the history
The zombie crash monitor is disabled by default and never enabled anywhere in the code.
  • Loading branch information
philipphofmann committed Mar 20, 2023
1 parent 20163bb commit 1e065bc
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 377 deletions.
8 changes: 0 additions & 8 deletions Sentry.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@
63FE70DD20DA4C1000CDBAE8 /* SentryCrashMonitor_Signal.h in Headers */ = {isa = PBXBuildFile; fileRef = 63FE6FF420DA4C1000CDBAE8 /* SentryCrashMonitor_Signal.h */; };
63FE70DF20DA4C1000CDBAE8 /* SentryCrashMonitorType.c in Sources */ = {isa = PBXBuildFile; fileRef = 63FE6FF520DA4C1000CDBAE8 /* SentryCrashMonitorType.c */; };
63FE70E120DA4C1000CDBAE8 /* SentryCrashMonitor_CPPException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63FE6FF620DA4C1000CDBAE8 /* SentryCrashMonitor_CPPException.cpp */; };
63FE70E320DA4C1000CDBAE8 /* SentryCrashMonitor_Zombie.c in Sources */ = {isa = PBXBuildFile; fileRef = 63FE6FF720DA4C1000CDBAE8 /* SentryCrashMonitor_Zombie.c */; };
63FE70E520DA4C1000CDBAE8 /* SentryCrashMonitor_CPPException.h in Headers */ = {isa = PBXBuildFile; fileRef = 63FE6FF820DA4C1000CDBAE8 /* SentryCrashMonitor_CPPException.h */; };
63FE70E720DA4C1000CDBAE8 /* SentryCrashMonitor.c in Sources */ = {isa = PBXBuildFile; fileRef = 63FE6FF920DA4C1000CDBAE8 /* SentryCrashMonitor.c */; };
63FE70EB20DA4C1000CDBAE8 /* SentryCrashMonitor_MachException.h in Headers */ = {isa = PBXBuildFile; fileRef = 63FE6FFB20DA4C1000CDBAE8 /* SentryCrashMonitor_MachException.h */; };
Expand All @@ -178,7 +177,6 @@
63FE70F320DA4C1000CDBAE8 /* SentryCrashMonitor_Signal.c in Sources */ = {isa = PBXBuildFile; fileRef = 63FE6FFF20DA4C1000CDBAE8 /* SentryCrashMonitor_Signal.c */; };
63FE70F520DA4C1000CDBAE8 /* SentryCrashMonitor_System.h in Headers */ = {isa = PBXBuildFile; fileRef = 63FE700020DA4C1000CDBAE8 /* SentryCrashMonitor_System.h */; };
63FE70F920DA4C1000CDBAE8 /* SentryCrashMonitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 63FE700220DA4C1000CDBAE8 /* SentryCrashMonitor.h */; };
63FE70FB20DA4C1000CDBAE8 /* SentryCrashMonitor_Zombie.h in Headers */ = {isa = PBXBuildFile; fileRef = 63FE700320DA4C1000CDBAE8 /* SentryCrashMonitor_Zombie.h */; };
63FE70FD20DA4C1000CDBAE8 /* SentryCrashCachedData.c in Sources */ = {isa = PBXBuildFile; fileRef = 63FE700420DA4C1000CDBAE8 /* SentryCrashCachedData.c */; };
63FE710120DA4C1000CDBAE8 /* SentryCrashDate.h in Headers */ = {isa = PBXBuildFile; fileRef = 63FE700720DA4C1000CDBAE8 /* SentryCrashDate.h */; };
63FE710320DA4C1000CDBAE8 /* SentryCrashMachineContext_Apple.h in Headers */ = {isa = PBXBuildFile; fileRef = 63FE700820DA4C1000CDBAE8 /* SentryCrashMachineContext_Apple.h */; };
Expand Down Expand Up @@ -1015,7 +1013,6 @@
63FE6FF420DA4C1000CDBAE8 /* SentryCrashMonitor_Signal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SentryCrashMonitor_Signal.h; sourceTree = "<group>"; };
63FE6FF520DA4C1000CDBAE8 /* SentryCrashMonitorType.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SentryCrashMonitorType.c; sourceTree = "<group>"; };
63FE6FF620DA4C1000CDBAE8 /* SentryCrashMonitor_CPPException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SentryCrashMonitor_CPPException.cpp; sourceTree = "<group>"; };
63FE6FF720DA4C1000CDBAE8 /* SentryCrashMonitor_Zombie.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SentryCrashMonitor_Zombie.c; sourceTree = "<group>"; };
63FE6FF820DA4C1000CDBAE8 /* SentryCrashMonitor_CPPException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SentryCrashMonitor_CPPException.h; sourceTree = "<group>"; };
63FE6FF920DA4C1000CDBAE8 /* SentryCrashMonitor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SentryCrashMonitor.c; sourceTree = "<group>"; };
63FE6FFB20DA4C1000CDBAE8 /* SentryCrashMonitor_MachException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SentryCrashMonitor_MachException.h; sourceTree = "<group>"; };
Expand All @@ -1025,7 +1022,6 @@
63FE6FFF20DA4C1000CDBAE8 /* SentryCrashMonitor_Signal.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SentryCrashMonitor_Signal.c; sourceTree = "<group>"; };
63FE700020DA4C1000CDBAE8 /* SentryCrashMonitor_System.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SentryCrashMonitor_System.h; sourceTree = "<group>"; };
63FE700220DA4C1000CDBAE8 /* SentryCrashMonitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SentryCrashMonitor.h; sourceTree = "<group>"; };
63FE700320DA4C1000CDBAE8 /* SentryCrashMonitor_Zombie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SentryCrashMonitor_Zombie.h; sourceTree = "<group>"; };
63FE700420DA4C1000CDBAE8 /* SentryCrashCachedData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SentryCrashCachedData.c; sourceTree = "<group>"; };
63FE700720DA4C1000CDBAE8 /* SentryCrashDate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SentryCrashDate.h; sourceTree = "<group>"; };
63FE700820DA4C1000CDBAE8 /* SentryCrashMachineContext_Apple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SentryCrashMachineContext_Apple.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2324,8 +2320,6 @@
63FE6FF420DA4C1000CDBAE8 /* SentryCrashMonitor_Signal.h */,
63FE700020DA4C1000CDBAE8 /* SentryCrashMonitor_System.h */,
63FE6FF320DA4C1000CDBAE8 /* SentryCrashMonitor_System.m */,
63FE6FF720DA4C1000CDBAE8 /* SentryCrashMonitor_Zombie.c */,
63FE700320DA4C1000CDBAE8 /* SentryCrashMonitor_Zombie.h */,
63FE6FF920DA4C1000CDBAE8 /* SentryCrashMonitor.c */,
63FE700220DA4C1000CDBAE8 /* SentryCrashMonitor.h */,
63FE6FEE20DA4C1000CDBAE8 /* SentryCrashMonitorContext.h */,
Expand Down Expand Up @@ -3331,7 +3325,6 @@
D8ACE3CF2762187D00F5A213 /* SentryFileIOTrackingIntegration.h in Headers */,
7BECF42226145C5D00D9826E /* SentryMechanismMeta.h in Headers */,
63FE718920DA4C1100CDBAE8 /* SentryCrash.h in Headers */,
63FE70FB20DA4C1000CDBAE8 /* SentryCrashMonitor_Zombie.h in Headers */,
63AA769A1EB9C1C200D153DE /* SentryLog.h in Headers */,
7B56D73124616CCD00B842DA /* SentryConcurrentRateLimitsDictionary.h in Headers */,
03F84D2A27DD416B008FE43F /* SentryProfilingLogging.hpp in Headers */,
Expand Down Expand Up @@ -3972,7 +3965,6 @@
63FE714120DA4C1100CDBAE8 /* SentryCrashDate.c in Sources */,
63FE70DB20DA4C1000CDBAE8 /* SentryCrashMonitor_System.m in Sources */,
7BA61CBB247BC5D800C130A8 /* SentryCrashDefaultBinaryImageProvider.m in Sources */,
63FE70E320DA4C1000CDBAE8 /* SentryCrashMonitor_Zombie.c in Sources */,
63FE713120DA4C1100CDBAE8 /* SentryCrashDynamicLinker.c in Sources */,
8E25C95325F836D000DC215B /* SentryRandom.m in Sources */,
7BC85231245812EC005A70F0 /* SentryFileContents.m in Sources */,
Expand Down
5 changes: 0 additions & 5 deletions Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include "SentryCrashMonitor_NSException.h"
#include "SentryCrashMonitor_Signal.h"
#include "SentryCrashMonitor_System.h"
#include "SentryCrashMonitor_Zombie.h"
#include "SentryCrashSystemCapabilities.h"
#include "SentryCrashThread.h"

Expand Down Expand Up @@ -71,10 +70,6 @@ static Monitor g_monitors[] = {
.monitorType = SentryCrashMonitorTypeNSException,
.getAPI = sentrycrashcm_nsexception_getAPI,
},
{
.monitorType = SentryCrashMonitorTypeZombie,
.getAPI = sentrycrashcm_zombie_getAPI,
},
#endif
{
.monitorType = SentryCrashMonitorTypeCPPException,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ static const struct {
MONITORTYPE(SentryCrashMonitorTypeNSException),
MONITORTYPE(SentryCrashMonitorTypeSystem),
MONITORTYPE(SentryCrashMonitorTypeApplicationState),
MONITORTYPE(SentryCrashMonitorTypeZombie),
};
static const int g_monitorTypesCount = sizeof(g_monitorTypes) / sizeof(*g_monitorTypes);

Expand Down
12 changes: 3 additions & 9 deletions Sources/SentryCrash/Recording/Monitors/SentryCrashMonitorType.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,12 @@ typedef enum {
/* Keeps track of and injects application state. */
SentryCrashMonitorTypeApplicationState = 0x80,

/* Keeps track of zombies, and injects the last zombie NSException. */
SentryCrashMonitorTypeZombie = 0x100,
} SentryCrashMonitorType;

#define SentryCrashMonitorTypeAll \
(SentryCrashMonitorTypeMachException | SentryCrashMonitorTypeSignal \
| SentryCrashMonitorTypeCPPException | SentryCrashMonitorTypeNSException \
| SentryCrashMonitorTypeSystem | SentryCrashMonitorTypeApplicationState \
| SentryCrashMonitorTypeZombie)
| SentryCrashMonitorTypeSystem | SentryCrashMonitorTypeApplicationState)

#define SentryCrashMonitorTypeDebuggerUnsafe \
(SentryCrashMonitorTypeMachException | SentryCrashMonitorTypeSignal \
Expand All @@ -73,8 +70,6 @@ typedef enum {
#define SentryCrashMonitorTypeAsyncSafe \
(SentryCrashMonitorTypeMachException | SentryCrashMonitorTypeSignal)

#define SentryCrashMonitorTypeOptional (SentryCrashMonitorTypeZombie)

#define SentryCrashMonitorTypeAsyncUnsafe \
(SentryCrashMonitorTypeAll & (~SentryCrashMonitorTypeAsyncSafe))

Expand All @@ -87,9 +82,8 @@ typedef enum {
*/
#define SentryCrashMonitorTypeProductionSafe (SentryCrashMonitorTypeAll)

/** Production safe monitors, minus the optional ones. */
#define SentryCrashMonitorTypeProductionSafeMinimal \
(SentryCrashMonitorTypeProductionSafe & (~SentryCrashMonitorTypeOptional))
/** Production safe monitors */
#define SentryCrashMonitorTypeProductionSafeMinimal (SentryCrashMonitorTypeProductionSafe)

/** Monitors that are required for proper operation.
* These add essential information to the reports, but do not trigger reporting.
Expand Down
247 changes: 0 additions & 247 deletions Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_Zombie.c

This file was deleted.

Loading

0 comments on commit 1e065bc

Please sign in to comment.