Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

options.init() SIGABRT on macOS 10.15.7 #22

Open
NickGeek opened this issue Dec 21, 2020 · 4 comments
Open

options.init() SIGABRT on macOS 10.15.7 #22

NickGeek opened this issue Dec 21, 2020 · 4 comments
Assignees
Labels
bug Something isn't working upstream This is an upstream issue that can't be fixed here

Comments

@NickGeek
Copy link

Describe the bug
When running:

let sentry_shutdown: sentry::Shutdown = {
    sentry::set_hook(None, None);

    let mut options = sentry::Options::new();
    options.set_dsn("https://3cba4d15f7224ad98ffd1c4dfcc90ef8@o491589.ingest.sentry.io/5557394");
    options.set_environment(if config::IS_DEBUG { "debug" } else { "release" });
    options.set_release(config::VERSION);

    // TODO: this crashes on macOS
    options.init().expect("Failed to initialise Sentry")
};

The program SIGABRTs on the last line with the following message:

test(36049,0x1075c8dc0) malloc: *** error for object 0x7f83a0605270: pointer being freed was not allocated
test(36049,0x1075c8dc0) malloc: *** set a breakpoint in malloc_error_break to debug
[1]    36049 abort      ./target/debug/test

The error seems to be coming from crashpad at:

attachments.push_back(base::FilePath(data->event_path->path));

in sentry_backend_crashpad.cpp.

It works fine on Linux.

Environment:

  • OS: macOS 10.15.7
  • Default transport yes
  • Version 0.1.0
  • Rust 1.46.0
@NickGeek NickGeek added the bug Something isn't working label Dec 21, 2020
@daxpedda
Copy link
Owner

daxpedda commented Jan 12, 2021

Sorry for my long absence!

That is strange indeed, I'm unable to reproduce this. Can you check if this is still happening in master?

@NickGeek
Copy link
Author

NickGeek commented Feb 1, 2021

Hi,
Interestingly a new project with the latest version doesn't crash, but it still does on my main project. It seems to come from one of my modules (as in, the error is still from within crashpad but it only occurs if I add a mod declaration).

That module does include V8 so I wonder if somehow there's some UB hidden in there that interacts with crashpad.

@daxpedda
Copy link
Owner

daxpedda commented Feb 2, 2021

This sounds like an upstream issue, if you provide more details I can report this upstream.
An SSCCE would be great.

@daxpedda daxpedda added the upstream This is an upstream issue that can't be fixed here label Feb 2, 2021
@NickGeek
Copy link
Author

NickGeek commented Feb 6, 2021

I'll see what i can do. It may take a bit of effort for me to narrow it down to a SSCCE though. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working upstream This is an upstream issue that can't be fixed here
Projects
None yet
Development

No branches or pull requests

2 participants