pkg/proc/internal/ebpf: Fix size of ebpf type for fn_addr (#3080)

Must have been an issue overlooked in the initial implementation but
we should be using a 64-bit wide type to store the function address.
This commit is contained in:
Derek Parker
2022-07-28 02:30:08 -07:00
committed by GitHub
parent 6ad3169719
commit 36b35aad00
3 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@ typedef struct function_parameter_list {
long long g_addr_offset; // Offset of the Goroutine struct from the TLS segment.
int goroutine_id;
unsigned int fn_addr;
unsigned long long int fn_addr;
bool is_ret;
unsigned int n_parameters; // number of parameters.

View File

@ -40,7 +40,7 @@ type function_parameter_list_t struct {
goid_offset uint32
g_addr_offset uint64
goroutine_id uint32
fn_addr uint32
fn_addr uint64
is_ret bool
n_parameters uint32
@ -197,7 +197,7 @@ func parseFunctionParameterList(rawParamBytes []byte) RawUProbeParams {
func createFunctionParameterList(entry uint64, goidOffset int64, args []UProbeArgMap, isret bool) function_parameter_list_t {
var params function_parameter_list_t
params.goid_offset = uint32(goidOffset)
params.fn_addr = uint32(entry)
params.fn_addr = entry
params.is_ret = isret
params.n_parameters = 0
params.n_ret_parameters = 0