Git Product home page Git Product logo

Comments (4)

will avatar will commented on September 22, 2024

from sentry-native.

supervacuus avatar supervacuus commented on September 22, 2024

Hi, thanks for the report. I can gather from the stack trace that this must have been in a sentry-android version that came bundled with sentry-native < 0.6.2. The segfault comes from passing NULL to strcmp() inside sentry__string_eq().

Adding ptr/len interfaces to the API, I rewrote many string functions and specifically added early checks for NULLs. Especially the code in sentry_value_set_by_key() has been made safer. This was released with sentry-android 6.19.0.

from sentry-native.

thinkocapo avatar thinkocapo commented on September 22, 2024

is the suggestion to upgrade to 6.19.0? If so, what is the the new expected behavior? So I can communicate back to the customer.

For example:

  1. upgrade to 6.19.0
  2. the sdk should not error on itself anymore, therefore no event for sending to Sentry.io.
  3. or
  4. upgrade to 6.19.0
  5. the sdk might still error on itself, but the event will not get sent to Sentry.io? the sdk will fail more silently this time?

from sentry-native.

supervacuus avatar supervacuus commented on September 22, 2024

I would always recommend upgrading if there seems to be a bug in an SDK because we do not maintain separate release branches, so even if there is still an issue in the latest release, I can only supply a fix on top of that. Going deeper, this stack trace is probably from version 0.4.18 of the Native SDK, released over a year ago (and packaged with sentry-android 6.3.1).

The crash in the Native SDK is probably caused by the same memory corruption which caused the application to crash in the first place. We can make sure that we don't crash in that particular situation. However, the resulting crash event will still be affected by that. The stack trace shows that the segfault occurs when setting the event_id of the crash-event, meaning that either the constant string "event_id" is NULL or that the event internal structure has been corrupted, leaving us to try to iterate over non-existent key/value pairs of a fresh object (which has no entries yet).

What I mean by that: fingers crossed that we can send a halfway decent crash report in that case. Understanding how that situation is possible would be interesting, but I cannot gather that from the stack trace. Maybe @Swatinem can look at the event and check if he sees something relevant.

from sentry-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.