Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix appsignal_free_* FFI missing pointer arguments #856

Merged
merged 1 commit into from
Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changesets/fix-ffi-arguments-for-free-functions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
bump: "patch"
type: "fix"
---

Fix FFI function calls missing arguments for `appsignal_free_transaction` and `appsignal_free_data` extension functions. This fixes a high CPU issue when these function calls would be retried indefinitely.
4 changes: 2 additions & 2 deletions lib/appsignal/extension/jruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def self.lib_extension

# Transaction methods
attach_function :appsignal_free_transaction,
[],
[:pointer],
:void
attach_function :appsignal_start_transaction,
[:appsignal_string, :appsignal_string, :long],
Expand Down Expand Up @@ -191,7 +191,7 @@ def self.lib_extension
:void

# Data struct methods
attach_function :appsignal_free_data, [], :void
attach_function :appsignal_free_data, [:pointer], :void
attach_function :appsignal_data_map_new, [], :pointer
attach_function :appsignal_data_array_new, [], :pointer
attach_function :appsignal_data_map_set_string,
Expand Down