Skip to content

Commit 404019c

Browse files
authored
Merge pull request #2151 from bugsnag/release/v6.12.0
release v6.12.0
2 parents d51fd3a + fceb52e commit 404019c

File tree

27 files changed

+249
-65
lines changed

27 files changed

+249
-65
lines changed

.buildkite/pipeline.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,69 @@ steps:
663663
concurrency_group: 'browserstack-app'
664664
concurrency_method: eager
665665

666+
- label: ':browserstack: Android 15 NDK r21 smoke tests'
667+
depends_on: "fixture-r21"
668+
timeout_in_minutes: 30
669+
plugins:
670+
artifacts#v1.9.0:
671+
download:
672+
- "build/bs-fixture-r21-url.txt"
673+
- "build/fixture-r21/*"
674+
upload:
675+
- "maze_output/failed/**/*"
676+
- "maze_output/metrics.csv"
677+
docker-compose#v4.7.0:
678+
pull: maze-runner
679+
run: maze-runner
680+
service-ports: true
681+
command:
682+
- "features/smoke_tests"
683+
- "--exclude=features/smoke_tests/01_anr.feature"
684+
- "--app=@build/bs-fixture-r21-url.txt"
685+
- "--appium-version=1.22.0"
686+
- "--farm=bs"
687+
- "--device=ANDROID_15"
688+
test-collector#v1.10.2:
689+
files: "reports/TEST-*.xml"
690+
format: "junit"
691+
branch: "^master|next$$"
692+
env:
693+
TEST_FIXTURE_SYMBOL_DIR: "build/fixture-r21"
694+
concurrency: 5
695+
concurrency_group: 'browserstack-app'
696+
concurrency_method: eager
697+
698+
- label: ':browserstack: Android 15 NDK r21 ANR smoke tests'
699+
depends_on: "fixture-r21"
700+
timeout_in_minutes: 30
701+
plugins:
702+
artifacts#v1.9.0:
703+
download:
704+
- "build/bs-fixture-r21-url.txt"
705+
- "build/fixture-r21/*"
706+
upload:
707+
- "maze_output/failed/**/*"
708+
- "maze_output/metrics.csv"
709+
docker-compose#v4.7.0:
710+
pull: maze-runner
711+
run: maze-runner
712+
service-ports: true
713+
command:
714+
- "features/smoke_tests/01_anr.feature"
715+
- "--app=@build/bs-fixture-r21-url.txt"
716+
- "--appium-version=1.22.0"
717+
- "--farm=bs"
718+
- "--device=ANDROID_15"
719+
test-collector#v1.10.2:
720+
files: "reports/TEST-*.xml"
721+
format: "junit"
722+
branch: "^master|next$$"
723+
env:
724+
TEST_FIXTURE_SYMBOL_DIR: "build/fixture-r21"
725+
concurrency: 5
726+
concurrency_group: 'browserstack-app'
727+
concurrency_method: eager
728+
666729
- label: 'Conditionally include device farms/full tests'
667730
agents:
668731
queue: macos

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
version: 2
6+
updates:
7+
- package-ecosystem: "bundler"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"
11+
- package-ecosystem: "github-actions"
12+
directory: "/"
13+
schedule:
14+
interval: "weekly"

.github/workflows/codeql.yml

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
branches: [ "next", integration/**/*, main ]
1818
pull_request:
1919
# The branches below must be a subset of the branches above
20-
branches: [ "next" ]
20+
branches: [ "next", "main" ]
2121
schedule:
2222
- cron: '26 16 * * 1'
2323

@@ -27,7 +27,7 @@ env:
2727
jobs:
2828
analyze:
2929
name: Analyze
30-
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-22.04' }}
30+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-24.04' }}
3131
permissions:
3232
actions: read
3333
contents: read
@@ -44,18 +44,23 @@ jobs:
4444

4545
steps:
4646
- name: Checkout repository
47-
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 #v3.6.0
47+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
4848
with:
4949
submodules: recursive
50-
- uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4 #v1.1.0
50+
- uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6 #v3.5.0
5151

52-
- uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 #v3.13.0
52+
- uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 #v4.7.0
5353
with:
5454
distribution: 'zulu'
55-
java-version: 11
55+
java-version: 17
56+
57+
- name: Setup Android SDK
58+
uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3.2.2
59+
with:
60+
packages: 'cmake;3.22.1'
5661

5762
- name: Gradle cache
58-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa #v2.12.0
63+
uses: gradle/gradle-build-action@ac2d340dc04d9e1113182899e983b5400c17cda1 #v3.5.0
5964

6065
# Initializes the CodeQL tools for scanning.
6166
- name: Initialize CodeQL
@@ -73,17 +78,6 @@ jobs:
7378
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
7479
# If this step fails, then you should remove it and run the build manually (see below)
7580
- name: Autobuild
76-
# uses: github/codeql-action/autobuild@396bb3e45325a47dd9ef434068033c6d5bb0d11a #v3.27.3
77-
78-
# ℹ️ Command-line programs to run using the OS shell.
79-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
80-
81-
# If the Autobuild fails above, remove it and uncomment the following three lines.
82-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
83-
84-
# - run: |
85-
# echo "Run, Build Application using script"
86-
# ./location_of_script_within_repo/buildscript.sh
8781
run: |
8882
echo "Run, Build Application using script"
8983
./gradlew --no-daemon assemble

.github/workflows/scorecard.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ jobs:
3232

3333
steps:
3434
- name: "Checkout code"
35-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
35+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3636
with:
3737
persist-credentials: false
3838

3939
- name: "Run analysis"
40-
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
40+
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
4141
with:
4242
results_file: results.sarif
4343
results_format: sarif
@@ -59,7 +59,7 @@ jobs:
5959
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
6060
# format to the repository Actions tab.
6161
- name: "Upload artifact"
62-
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
62+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
6363
with:
6464
name: SARIF file
6565
path: results.sarif
@@ -68,6 +68,6 @@ jobs:
6868
# Upload the results to GitHub's code scanning dashboard (optional).
6969
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
7070
- name: "Upload to code-scanning"
71-
uses: github/codeql-action/upload-sarif@v3
71+
uses: github/codeql-action/upload-sarif@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
7272
with:
7373
sarif_file: results.sarif

.github/workflows/signing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
run: |
2424
echo "${{ secrets.PLATFORMS_GPG_KEY_BASE64 }}" | base64 --decode | gpg --batch --import
2525
- name: Sign assets
26-
uses: bugsnag/platforms-release-signer@main
26+
uses: bugsnag/platforms-release-signer@4d88944b11e503624f8a511cf6d0fa2901822b60 # v1.0.0
2727
with:
2828
github_token: ${{ secrets.PLATFORMS_SIGNING_GITHUB_TOKEN }}
2929
full_repository: ${{ github.repository }}

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
# Changelog
22

3+
## 6.12.0 (2025-02-18)
4+
5+
### Enhancements
6+
7+
* Native crashes will now include their signal code (where applicable) in the error message
8+
[#2135](https://github.com/bugsnag/bugsnag-android/pull/2135)
9+
* Bumped the version of `protobuf-javalite` used by [bugsnag-plugin-android-exitinfo](bugsnag-plugin-android-exitinfo) to 3.25.5
10+
[#2144](https://github.com/bugsnag/bugsnag-android/pull/2144)
11+
312
## 6.11.0 (2025-01-22)
413

514
### Enhancements
615

7-
* Introduced a new option in the `exitinfo` plugin for generating ANRs that does not have a matching Events (such as background ANRs)
16+
* Introduced a new option in the `exitinfo` plugin for generating ANRs that does not have a matching Events (such as background ANRs). See our online docs for more information on enabling this feature: https://docs.bugsnag.com/platforms/android/reporting-exit-info.
817
[#2116](https://github.com/bugsnag/bugsnag-android/pull/2116)
918
* Add original error class and message to metadata for link errors loading BugSnag NDK libraries
1019
[#2126](https://github.com/bugsnag/bugsnag-android/pull/2126)

bugsnag-android-core/src/main/java/com/bugsnag/android/Notifier.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import java.io.IOException
77
*/
88
class Notifier @JvmOverloads constructor(
99
var name: String = "Android Bugsnag Notifier",
10-
var version: String = "6.11.0",
10+
var version: String = "6.12.0",
1111
var url: String = "https://bugsnag.com"
1212
) : JsonStream.Streamable {
1313

bugsnag-plugin-android-exitinfo/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ android {
5858
dependencies {
5959
addCommonModuleDependencies()
6060
api(project(":bugsnag-android-core"))
61-
implementation("com.google.protobuf:protobuf-javalite:3.24.2")
61+
implementation("com.google.protobuf:protobuf-javalite:3.25.5")
6262
}
6363

6464
protobuf {
6565
protoc {
66-
artifact = "com.google.protobuf:protoc:3.24.2"
66+
artifact = "com.google.protobuf:protoc:3.25.5"
6767
}
6868
generateProtoTasks {
6969
all().configureEach {

bugsnag-plugin-android-ndk/src/main/jni/handlers/signal_handler.c

Lines changed: 101 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "../utils/string.h"
1717
#include "../utils/threads.h"
1818
#define BSG_HANDLED_SIGNAL_COUNT 6
19-
19+
#define BSG_SIGNAL_CODE_COUNT 15
2020
/**
2121
* Function to capture signals and write reports to disk
2222
* @param signum The captured signal number
@@ -48,6 +48,17 @@ struct sigaction *bsg_global_sigaction;
4848
/* the previous signal handler array */
4949
struct sigaction *bsg_global_sigaction_previous;
5050

51+
#define MSG_SIGILL "Illegal instruction"
52+
#define MSG_SIGTRAP "Trace/breakpoint trap"
53+
#define MSG_SIGABRT "Abort program"
54+
#define MSG_SIGBUS "Bus error (bad memory access)"
55+
#define MSG_SIGFPE "Floating-point exception"
56+
#define MSG_SIGSEGV "Segmentation violation (invalid memory reference)"
57+
58+
#define xstr(s) str(s)
59+
#define str(s) #s
60+
#define SIG_CODE_MESSAGE(msg, code) (msg ", code " xstr(code) " (" #code ")")
61+
5162
/**
5263
* Native signals which will be captured by the Bugsnag signal handler™
5364
*/
@@ -56,12 +67,88 @@ static const int bsg_native_signals[BSG_HANDLED_SIGNAL_COUNT + 1] = {
5667
static const char bsg_native_signal_names[BSG_HANDLED_SIGNAL_COUNT + 1][8] = {
5768
"SIGILL", "SIGTRAP", "SIGABRT", "SIGBUS", "SIGFPE", "SIGSEGV"};
5869
static const char bsg_native_signal_msgs[BSG_HANDLED_SIGNAL_COUNT + 1][60] = {
59-
"Illegal instruction",
60-
"Trace/breakpoint trap",
61-
"Abort program",
62-
"Bus error (bad memory access)",
63-
"Floating-point exception",
64-
"Segmentation violation (invalid memory reference)"};
70+
MSG_SIGILL, MSG_SIGTRAP, MSG_SIGABRT, MSG_SIGBUS, MSG_SIGFPE, MSG_SIGSEGV};
71+
72+
static const char
73+
bsg_native_signal_code_names[BSG_HANDLED_SIGNAL_COUNT +
74+
1][BSG_SIGNAL_CODE_COUNT + 1][72] = {
75+
{SIG_CODE_MESSAGE(MSG_SIGILL, ILL_ILLOPC),
76+
SIG_CODE_MESSAGE(MSG_SIGILL, ILL_ILLOPN),
77+
SIG_CODE_MESSAGE(MSG_SIGILL, ILL_ILLADR),
78+
SIG_CODE_MESSAGE(MSG_SIGILL, ILL_ILLTRP),
79+
SIG_CODE_MESSAGE(MSG_SIGILL, ILL_PRVOPC),
80+
SIG_CODE_MESSAGE(MSG_SIGILL, ILL_PRVREG),
81+
SIG_CODE_MESSAGE(MSG_SIGILL, ILL_COPROC),
82+
SIG_CODE_MESSAGE(MSG_SIGILL, ILL_BADSTK),
83+
SIG_CODE_MESSAGE(MSG_SIGILL, ILL_BADIADDR),
84+
SIG_CODE_MESSAGE(MSG_SIGILL, __ILL_BREAK),
85+
SIG_CODE_MESSAGE(MSG_SIGILL, __ILL_BNDMOD)},
86+
{SIG_CODE_MESSAGE(MSG_SIGTRAP, TRAP_BRKPT),
87+
SIG_CODE_MESSAGE(MSG_SIGTRAP, TRAP_TRACE),
88+
SIG_CODE_MESSAGE(MSG_SIGTRAP, TRAP_BRANCH),
89+
SIG_CODE_MESSAGE(MSG_SIGTRAP, TRAP_HWBKPT),
90+
SIG_CODE_MESSAGE(MSG_SIGTRAP, TRAP_UNK),
91+
SIG_CODE_MESSAGE(MSG_SIGTRAP, TRAP_PERF)},
92+
{0},
93+
{SIG_CODE_MESSAGE(MSG_SIGBUS, BUS_ADRALN),
94+
SIG_CODE_MESSAGE(MSG_SIGBUS, BUS_ADRERR),
95+
SIG_CODE_MESSAGE(MSG_SIGBUS, BUS_OBJERR),
96+
SIG_CODE_MESSAGE(MSG_SIGBUS, BUS_MCEERR_AR),
97+
SIG_CODE_MESSAGE(MSG_SIGBUS, BUS_MCEERR_AO)},
98+
{SIG_CODE_MESSAGE(MSG_SIGFPE, FPE_INTDIV),
99+
SIG_CODE_MESSAGE(MSG_SIGFPE, FPE_INTOVF),
100+
SIG_CODE_MESSAGE(MSG_SIGFPE, FPE_FLTDIV),
101+
SIG_CODE_MESSAGE(MSG_SIGFPE, FPE_FLTOVF),
102+
SIG_CODE_MESSAGE(MSG_SIGFPE, FPE_FLTUND),
103+
SIG_CODE_MESSAGE(MSG_SIGFPE, FPE_FLTRES),
104+
SIG_CODE_MESSAGE(MSG_SIGFPE, FPE_FLTINV),
105+
SIG_CODE_MESSAGE(MSG_SIGFPE, FPE_FLTSUB),
106+
SIG_CODE_MESSAGE(MSG_SIGFPE, __FPE_DECOVF),
107+
SIG_CODE_MESSAGE(MSG_SIGFPE, __FPE_DECDIV),
108+
SIG_CODE_MESSAGE(MSG_SIGFPE, __FPE_DECERR),
109+
SIG_CODE_MESSAGE(MSG_SIGFPE, __FPE_INVASC),
110+
SIG_CODE_MESSAGE(MSG_SIGFPE, __FPE_INVDEC),
111+
SIG_CODE_MESSAGE(MSG_SIGFPE, FPE_FLTUNK),
112+
SIG_CODE_MESSAGE(MSG_SIGFPE, FPE_CONDTRAP)},
113+
{SIG_CODE_MESSAGE(MSG_SIGSEGV, SEGV_MAPERR),
114+
SIG_CODE_MESSAGE(MSG_SIGSEGV, SEGV_ACCERR),
115+
SIG_CODE_MESSAGE(MSG_SIGSEGV, SEGV_BNDERR),
116+
SIG_CODE_MESSAGE(MSG_SIGSEGV, SEGV_PKUERR),
117+
SIG_CODE_MESSAGE(MSG_SIGSEGV, SEGV_ACCADI),
118+
SIG_CODE_MESSAGE(MSG_SIGSEGV, SEGV_ADIDERR),
119+
SIG_CODE_MESSAGE(MSG_SIGSEGV, SEGV_ADIPERR),
120+
SIG_CODE_MESSAGE(MSG_SIGSEGV, SEGV_MTEAERR),
121+
SIG_CODE_MESSAGE(MSG_SIGSEGV, SEGV_MTESERR)}};
122+
123+
static const int bsg_native_signal_codes[BSG_HANDLED_SIGNAL_COUNT +
124+
1][BSG_SIGNAL_CODE_COUNT + 1] = {
125+
{ILL_ILLOPC, ILL_ILLOPN, ILL_ILLADR, ILL_ILLTRP, ILL_PRVOPC, ILL_PRVREG,
126+
ILL_COPROC, ILL_BADSTK, ILL_BADIADDR, __ILL_BREAK, __ILL_BNDMOD},
127+
{TRAP_BRKPT, TRAP_TRACE, TRAP_BRANCH, TRAP_HWBKPT, TRAP_UNK, TRAP_PERF},
128+
{BUS_ADRALN, BUS_ADRERR, BUS_OBJERR, BUS_MCEERR_AR, BUS_MCEERR_AO},
129+
{FPE_INTDIV, FPE_INTOVF, FPE_FLTDIV, FPE_FLTOVF, FPE_FLTUND, FPE_FLTRES,
130+
FPE_FLTINV, FPE_FLTSUB, __FPE_DECOVF, __FPE_DECDIV, __FPE_DECERR,
131+
__FPE_INVASC, __FPE_INVDEC, FPE_FLTUNK, FPE_CONDTRAP},
132+
{SEGV_MAPERR, SEGV_ACCERR, SEGV_BNDERR, SEGV_PKUERR, SEGV_ACCADI,
133+
SEGV_ADIDERR, SEGV_ADIPERR, SEGV_MTEAERR, SEGV_MTESERR}};
134+
135+
static const char *
136+
bsg_get_signal_code_description(const int signal,
137+
const int signal_code) __asyncsafe {
138+
for (int i = 0; i < BSG_HANDLED_SIGNAL_COUNT; i++) {
139+
if (bsg_native_signals[i] == signal) {
140+
for (int j = 0; j < BSG_SIGNAL_CODE_COUNT; j++) {
141+
if (bsg_native_signal_codes[i][j] == signal_code) {
142+
return bsg_native_signal_code_names[i][j];
143+
} else if (*bsg_native_signal_code_names[i][j] == 0) {
144+
// NULL in the signal_code_name array indicates no more known codes
145+
break;
146+
}
147+
}
148+
}
149+
}
150+
return NULL;
151+
}
65152

66153
bool bsg_handler_install_signal(bsg_environment *env) {
67154
if (bsg_global_env != NULL) {
@@ -195,12 +282,17 @@ void bsg_handle_signal(int signum, siginfo_t *info,
195282

196283
for (int i = 0; i < BSG_HANDLED_SIGNAL_COUNT; i++) {
197284
const int signal = bsg_native_signals[i];
285+
const int signal_code = info->si_code;
198286
if (signal == signum) {
199287
bsg_strncpy(bsg_global_env->next_event.error.errorClass,
200288
(char *)bsg_native_signal_names[i],
201289
sizeof(bsg_global_env->next_event.error.errorClass));
202-
bsg_strncpy(bsg_global_env->next_event.error.errorMessage,
203-
(char *)bsg_native_signal_msgs[i],
290+
const char *error_message =
291+
bsg_get_signal_code_description(signal, signal_code);
292+
if (error_message == NULL || *error_message == 0) {
293+
error_message = (char *)bsg_native_signal_msgs[i];
294+
}
295+
bsg_strncpy(bsg_global_env->next_event.error.errorMessage, error_message,
204296
sizeof(bsg_global_env->next_event.error.errorMessage));
205297
break;
206298
}

examples/sdk-app-example/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ android {
4242
}
4343

4444
dependencies {
45-
implementation "com.bugsnag:bugsnag-android:6.11.0"
46-
implementation "com.bugsnag:bugsnag-plugin-android-okhttp:6.11.0"
45+
implementation "com.bugsnag:bugsnag-android:6.12.0"
46+
implementation "com.bugsnag:bugsnag-plugin-android-okhttp:6.12.0"
4747
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
4848
implementation "androidx.appcompat:appcompat:1.6.1"
4949
implementation "com.google.android.material:material:1.11.0"

0 commit comments

Comments
 (0)