Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase resilience of NDK stackframe method capture #1484

Merged
merged 2 commits into from
Nov 8, 2021

Conversation

fractalwrench
Copy link
Contributor

@fractalwrench fractalwrench commented Nov 4, 2021

Goal

Increases the resilience of the code used to instantiate a StackTraceElement object when calling bugsnag_notify_env. There were a couple of potential issues with the existing implementation:

  • The return values of filename and method weren't checked for NULL, which could lead to exceptions being thrown in bsg_safe_new_object
  • The return value of calloc was not checked for NULL, which could lead to a malformed string if bsg_safe_new_string_utf failed, resulting in a SIGABRT

Testing

Relied on existing test coverage.

@fractalwrench fractalwrench changed the title Increase resilience for NDK stackframe method capture Increase resilience of NDK stackframe method capture Nov 4, 2021
@fractalwrench fractalwrench marked this pull request as ready for review November 4, 2021 16:25
@bugsnagbot
Copy link
Collaborator

Android notifier sizes

Format Size impact of Bugsnag (kB) Size impact of Bugsnag when Minified (kB)
APK 1280.73 1166.03
arm64_v8a 410.0 299.4
armeabi -492.59 -21.55
armeabi_v7a 381.33 270.74
x86 450.94 336.25
x86_64 434.56 323.97

Generated by 🚫 Danger

@fractalwrench fractalwrench merged commit cf8e225 into next Nov 8, 2021
@fractalwrench fractalwrench deleted the PLAT-7529/stackframe-fix branch November 8, 2021 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants