Skip to content

Commit

Permalink
Profiling: Add note about Ruby 3.2 bug
Browse files Browse the repository at this point in the history
**What does this PR do?**

This PR adds a reference to https://bugs.ruby-lang.org/issues/19482 /
ruby/ruby#7464 to the reasons why
`allocation_counting_enabled` should not be enabled on Ruby 3.2.0 to
3.2.2.

No code needs to be changed since we were already excluding those
Ruby versions due to a different bug.

**Motivation:**

I like having this in the code as it may be relevant in the future
(e.g. if the issue reappears).

**Additional Notes:**

N/A

**How to test the change?**

No code is changed!
  • Loading branch information
ivoanjo committed Oct 3, 2023
1 parent 5147774 commit e02d76c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/datadog/core/configuration/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,11 @@ def initialize(*_)
# garbage collected, Ruby will disable all active tracepoints, which this feature internally relies on.
# Thus this feature is only usable if you're not using Ractors.
#
# Caveat 3 (severe):
# Ruby 3.2.0 to 3.2.2 have a bug in the newobj tracepoint (https://bugs.ruby-lang.org/issues/19482,
# https://github.com/ruby/ruby/pull/7464) so that's an extra reason why it's not safe on those Rubies.
# This bug is fixed on Ruby versions 3.2.2 and 3.3.0.
#
# @default `true` on Ruby 2.x and 3.1.4+, 3.2.3+ and 3.3.0+; `false` for Ruby 3.0 and unpatched Rubies.
option :allocation_counting_enabled do |o|
o.default do
Expand Down

0 comments on commit e02d76c

Please sign in to comment.