Git Product home page Git Product logo

Comments (1)

MatkovIvan avatar MatkovIvan commented on July 24, 2024

Hi @jackieyk,

Thanks for getting in touch!
It's expected - by design PLCrashReporterCallbacks calls after writing the crash to disk. Also, this callback has significant limitations, and cannot be considered as regular "on crash callback". Please read that doc for details:

/**
* @page async_safety Async-Safe Programming Guide
*
* Plausible CrashReporter provides support for executing an application specified function in the context of the
* crash reporter's signal handler, after the crash report has been written to disk. This was a regularly requested
* feature, and provides the ability to implement application finalization in the event of a crash. However, writing
* code intended for execution inside of a signal handler is exceptionally difficult, and is not recommended.
*
* @section program_flow Program Flow and Signal Handlers
*
* When the signal handler is called the normal flow of the program is interrupted, and your program is an unknown
* state. Locks may be held, the heap may be corrupt (or in the process of being updated), and your signal
* handler may invoke a function that was being executed at the time of the signal. This may result in deadlocks,
* data corruption, and program termination.
*
* @section functions Async-Safe Functions
*
* A subset of functions are defined to be async-safe by the OS, and are safely callable from within a signal handler. If
* you do implement a custom post-crash handler, it must be async-safe. A table of POSIX-defined async-safe functions
* and additional information is available from the
* <a href="https://www.securecoding.cert.org/confluence/display/seccode/SIG30-C.+Call+only+asynchronous-safe+functions+within+signal+handlers">CERT programming guide - SIG30-C</a>
*
* Most notably, the Objective-C runtime itself is not async-safe, and Objective-C may not be used within a signal
* handler.
*
* @sa PLCrashReporter::setCrashCallbacks:
*/

The same is for customData - it's by design that it must be set before the crash. The reasons are similar.

from plcrashreporter.

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.