Skip to content

Commit

Permalink
Merge pull request #1517 from bugsnag/release-v6.25.2
Browse files Browse the repository at this point in the history
Release v6.25.2
  • Loading branch information
kstenerud committed Jan 19, 2023
2 parents 8a692ad + 2c0694f commit b260ddb
Show file tree
Hide file tree
Showing 22 changed files with 153 additions and 63 deletions.
8 changes: 4 additions & 4 deletions .buildkite/pipeline.full.yml
Expand Up @@ -252,8 +252,8 @@ steps:
download: "features/fixtures/ios/output/ipa_url.txt"
upload: "maze_output/failed/**/*"
docker-compose#v3.7.0:
pull: cocoa-maze-runner
run: cocoa-maze-runner
pull: cocoa-maze-runner-legacy
run: cocoa-maze-runner-legacy
command:
- "--app=@build/ipa_url.txt"
- "--farm=bs"
Expand Down Expand Up @@ -283,8 +283,8 @@ steps:
download: "features/fixtures/ios/output/ipa_url.txt"
upload: "maze_output/failed/**/*"
docker-compose#v3.7.0:
pull: cocoa-maze-runner
run: cocoa-maze-runner
pull: cocoa-maze-runner-legacy
run: cocoa-maze-runner-legacy
command:
- "--app=@build/ipa_url.txt"
- "--farm=bs"
Expand Down
8 changes: 4 additions & 4 deletions .buildkite/pipeline.yml
Expand Up @@ -275,8 +275,8 @@ steps:
download: "features/fixtures/ios/output/ipa_url.txt"
upload: "maze_output/failed/**/*"
docker-compose#v3.7.0:
pull: cocoa-maze-runner
run: cocoa-maze-runner
pull: cocoa-maze-runner-legacy
run: cocoa-maze-runner-legacy
command:
- "--app=@build/ipa_url.txt"
- "--farm=bs"
Expand Down Expand Up @@ -305,8 +305,8 @@ steps:
download: "features/fixtures/ios/output/ipa_url.txt"
upload: "maze_output/failed/**/*"
docker-compose#v3.7.0:
pull: cocoa-maze-runner
run: cocoa-maze-runner
pull: cocoa-maze-runner-legacy
run: cocoa-maze-runner-legacy
command:
- "--app=@build/ipa_url.txt"
- "--farm=bs"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull_request.yml
Expand Up @@ -4,7 +4,7 @@ on: [pull_request]
jobs:

analyze:
runs-on: macos-latest
runs-on: macos-11
env:
# Infer 1.0.1 cannot parse the iOS 15 SDK headers
DEVELOPER_DIR: /Applications/Xcode_12.5.1.app
Expand All @@ -23,7 +23,7 @@ jobs:
run: make oclint

danger:
runs-on: macos-latest
runs-on: macos-11
steps:
- name: Checkout target branch
uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions .jazzy.yaml
Expand Up @@ -2,11 +2,11 @@ author_url: "https://www.bugsnag.com"
author: "Bugsnag Inc"
clean: false # avoid deleting docs/.git
framework_root: "Bugsnag"
github_file_prefix: "https://github.com/bugsnag/bugsnag-cocoa/tree/v6.25.1/Bugsnag"
github_file_prefix: "https://github.com/bugsnag/bugsnag-cocoa/tree/v6.25.2/Bugsnag"
github_url: "https://github.com/bugsnag/bugsnag-cocoa"
hide_documentation_coverage: true
module: "Bugsnag"
module_version: "6.25.1"
module_version: "6.25.2"
objc: true
output: "docs"
readme: "README.md"
Expand Down
4 changes: 2 additions & 2 deletions Bugsnag.podspec.json
@@ -1,6 +1,6 @@
{
"name": "Bugsnag",
"version": "6.25.1",
"version": "6.25.2",
"summary": "The Bugsnag crash reporting framework for Apple platforms.",
"homepage": "https://bugsnag.com",
"license": "MIT",
Expand All @@ -9,7 +9,7 @@
},
"source": {
"git": "https://github.com/bugsnag/bugsnag-cocoa.git",
"tag": "v6.25.1"
"tag": "v6.25.2"
},
"ios": {
"frameworks": [
Expand Down
22 changes: 14 additions & 8 deletions Bugsnag/Helpers/BSGRunContext.m
Expand Up @@ -31,7 +31,6 @@
atomic_store((_Atomic(typeof(field)) *)&field, newValue_); \
} while (0)


#pragma mark Forward declarations

static uint64_t GetBootTime(void);
Expand Down Expand Up @@ -259,11 +258,16 @@ static void NoteThermalState(__unused CFNotificationCenterRef center,
__unused CFNotificationName name,
const void *object,
__unused CFDictionaryRef userInfo) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunguarded-availability-new"
bsg_runContext->thermalState = ((__bridge NSProcessInfo *)object).thermalState;
#pragma clang diagnostic pop
BSGRunContextUpdateTimestamp();
if (@available(iOS 11.0, tvOS 11.0, watchOS 4.0, *)) {
// Workaround for iOS 15.0.2 to 15.1.1: Foundation in rare cases posts
// ThermalStateDidChangeNotification from within -[NSProcessInfo thermalState],
// causing recursion and a crash via _os_unfair_lock_recursive_abort().
// To avoid this, grab the new thermal state asynchronously.
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
bsg_runContext->thermalState = ((__bridge NSProcessInfo *)object).thermalState;
BSGRunContextUpdateTimestamp();
});
}
}

#if BSG_HAVE_OOM_DETECTION
Expand Down Expand Up @@ -342,9 +346,11 @@ void BSGRunContextUpdateTimestamp() {
}

static void UpdateHostMemory() {
static mach_port_t host;
static _Atomic mach_port_t host_atomic = 0;
mach_port_t host = atomic_load(&host_atomic);
if (!host) {
host = mach_host_self();
atomic_store(&host_atomic, host);
}

vm_statistics_data_t host_vm;
Expand All @@ -357,7 +363,7 @@ static void UpdateHostMemory() {
}

size_t hostMemoryFree = host_vm.free_count * vm_kernel_page_size;
ATOMIC_SET(bsg_runContext->hostMemoryFree, hostMemoryFree);
bsg_runContext->hostMemoryFree = hostMemoryFree;
}

static void UpdateTaskMemory() {
Expand Down
7 changes: 5 additions & 2 deletions Bugsnag/Helpers/BSGSerialization.h
Expand Up @@ -9,7 +9,9 @@ NS_ASSUME_NONNULL_BEGIN
@param input a dictionary
@return a new dictionary
*/
NSMutableDictionary * BSGSanitizeDict(NSDictionary *input);
NSMutableDictionary *BSGSanitizeDict(NSDictionary * input);

NSMutableDictionary *_Nullable BSGSanitizePossibleDict(NSDictionary *_Nullable input);

/**
Cleans the object, including nested dictionary and array values
Expand All @@ -25,7 +27,8 @@ typedef struct _BSGTruncateContext {
NSUInteger length;
} BSGTruncateContext;

NSString * BSGTruncateString(BSGTruncateContext *context, NSString *_Nullable string);
NSString * BSGTruncateString(BSGTruncateContext *context, NSString * string);
NSString *_Nullable BSGTruncatePossibleString(BSGTruncateContext *context, NSString *_Nullable string);

id BSGTruncateStrings(BSGTruncateContext *context, id object);

Expand Down
14 changes: 14 additions & 0 deletions Bugsnag/Helpers/BSGSerialization.m
Expand Up @@ -20,6 +20,13 @@ id BSGSanitizeObject(id obj) {
return nil;
}

NSMutableDictionary * BSGSanitizePossibleDict(NSDictionary *input) {
if (![input isKindOfClass:[NSDictionary class]]) {
return nil;
}
return BSGSanitizeDict(input);
}

NSMutableDictionary * BSGSanitizeDict(NSDictionary *input) {
__block NSMutableDictionary *output =
[NSMutableDictionary dictionaryWithCapacity:[input count]];
Expand All @@ -44,6 +51,13 @@ id BSGSanitizeObject(id obj) {
return output;
}

NSString * BSGTruncatePossibleString(BSGTruncateContext *context, NSString *string) {
if (![string isKindOfClass:[NSString class]]) {
return nil;
}
return BSGTruncateString(context, string);
}

NSString * BSGTruncateString(BSGTruncateContext *context, NSString *string) {
const NSUInteger inputLength = string.length;
if (inputLength <= context->maxLength) return string;
Expand Down
6 changes: 3 additions & 3 deletions Bugsnag/Payload/BugsnagEvent.m
Expand Up @@ -729,12 +729,12 @@ - (void)truncateStrings:(NSUInteger)maxLength {
};

if (self.context) {
self.context = BSGTruncateString(&context, self.context);
self.context = BSGTruncatePossibleString(&context, self.context);
}

for (BugsnagError *error in self.errors) {
error.errorClass = BSGTruncateString(&context, error.errorClass);
error.errorMessage = BSGTruncateString(&context, error.errorMessage);
error.errorClass = BSGTruncatePossibleString(&context, error.errorClass);
error.errorMessage = BSGTruncatePossibleString(&context, error.errorMessage);
}

for (BugsnagBreadcrumb *breadcrumb in self.breadcrumbs) {
Expand Down
2 changes: 1 addition & 1 deletion Bugsnag/Payload/BugsnagNotifier.m
Expand Up @@ -23,7 +23,7 @@ - (instancetype)init {
#else
_name = @"Bugsnag Objective-C";
#endif
_version = @"6.25.1";
_version = @"6.25.2";
_url = @"https://github.com/bugsnag/bugsnag-cocoa";
_dependencies = @[];
}
Expand Down
6 changes: 3 additions & 3 deletions BugsnagNetworkRequestPlugin.podspec.json
@@ -1,16 +1,16 @@
{
"name": "BugsnagNetworkRequestPlugin",
"version": "6.25.1",
"version": "6.25.2",
"summary": "Network request monitoring support for Bugsnag.",
"homepage": "https://bugsnag.com",
"license": "MIT",
"authors": {
"Bugsnag": "notifiers@bugsnag.com"
},
"readme": "https://raw.githubusercontent.com/bugsnag/bugsnag-cocoa/v6.25.1/BugsnagNetworkRequestPlugin/README.md",
"readme": "https://raw.githubusercontent.com/bugsnag/bugsnag-cocoa/v6.25.2/BugsnagNetworkRequestPlugin/README.md",
"source": {
"git": "https://github.com/bugsnag/bugsnag-cocoa.git",
"tag": "v6.25.1"
"tag": "v6.25.2"
},
"dependencies": {
"Bugsnag": "~> 6.13"
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,16 @@
Changelog
=========

## 6.25.2 (2023-01-18)

### Bug fixes

* Workaround for thermal state lock re-entry bug on iOS 15.0.2-15.1.1.
[1514](https://github.com/bugsnag/bugsnag-cocoa/pull/1514)

* Clean up compiler warnings about data races and nullability.
[1515](https://github.com/bugsnag/bugsnag-cocoa/pull/1515)

## 6.25.1 (2022-12-07)

### Bug fixes
Expand Down
2 changes: 1 addition & 1 deletion Framework/Info.plist
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>6.25.1</string>
<string>6.25.2</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -4,7 +4,7 @@ gem 'cocoapods'

# A reference to Maze Runner is only needed for running tests locally and if committed it must be
# portable for CI, e.g. a specific release. However, leaving it commented out would mean quicker CI.
gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', tag: 'v6.17.0'
gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', tag: 'v7.10.1'

# Use a specific branch
#gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', branch: 'master'
Expand Down

0 comments on commit b260ddb

Please sign in to comment.