Skip to content

Commit ddbbbcb

Browse files
committed
Enable use_alt_stack setting for crashtracker
I spent some time looking into `use_alt_stack` setting and I think there's a bug in libdatadog and that setting doesn't seem to be doing anything at this point. Since the Ruby VM itself sets an altstack, this leaves us: * In libdatadog 13.1, the crashtracker code always used the altstack (e.g. equivalent of `use_alt_stack` was hardcoded to `true`) => in libdatadog 13.1 we used the Ruby altstack * In libdatadog 14.0, the crashtracker code chooses to use the altstack based on the value of `create_alt_stack` => libdatadog 14.0 we can't use the Ruby altstack In preparation for `use_alt_stack` to get fixed in a future libdatadog release, I'm changing it to true although, right now it's a no-op. This means that in a future libdatadog release, we'll be back to where we were in libdatadog 13.1: the crashtracker DOES NOT create its own altstack, BUT WILL USE the existing Ruby altstack.
1 parent 6c6a7ae commit ddbbbcb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/libdatadog_api/crashtracker.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static VALUE _native_start_or_update_on_fork(int argc, VALUE *argv, DDTRACE_UNUS
6767
// The Ruby crash handler also seems to get confused when this option is enabled and
6868
// "Process.kill('SEGV', Process.pid)" gets run.
6969
.create_alt_stack = false,
70-
.use_alt_stack = false,
70+
.use_alt_stack = true, // NOTE: This is a no-op in libdatadog 14.0; should be fixed in a future version
7171
.endpoint = endpoint,
7272
.resolve_frames = DDOG_CRASHT_STACKTRACE_COLLECTION_ENABLED_WITH_SYMBOLS_IN_RECEIVER,
7373
.timeout_ms = FIX2INT(upload_timeout_seconds) * 1000,

0 commit comments

Comments
 (0)