We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We saw a few cases where the offsetgen tool produced a wrong value. More specifically, a valid cached offset was re-written as nil in https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/1044/files# I couldn't reproduce this locally.
offsetgen
The main suspect is the following function:
func (i *Inspector) do(ctx context.Context, j job) (out []result, err error) { var uncachedIndices []int for _, f := range j.Fields { o, ok := i.Cache.GetOffset(j.AppVer, f) out = append(out, result{ StructField: f, Version: j.AppVer, Offset: o.Offset, Valid: o.Valid, }) if !ok { uncachedIndices = append(uncachedIndices, len(out)-1) } } if len(uncachedIndices) == 0 { return out, nil } app, err := newApp(ctx, i.log, j) buildErr := &errBuild{} if errors.As(err, &buildErr) { i.log.Debug( "failed to build app, skipping", "version", j.AppVer, "src", j.Renderer.src, "Go", j.Builder.GoImage, "rc", buildErr.ReturnCode, "stdout", buildErr.Stdout, "stderr", buildErr.Stderr, ) return out, nil } else if err != nil { return nil, err } defer app.Close() for _, i := range uncachedIndices { out[i].Offset, out[i].Valid = app.GetOffset(out[i].StructField) } return out, nil }
We can improve on the error handling there I think, @MrAlias WDYT?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We saw a few cases where the
offsetgen
tool produced a wrong value.More specifically, a valid cached offset was re-written as nil in https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/1044/files#
I couldn't reproduce this locally.
The main suspect is the following function:
We can improve on the error handling there I think,
@MrAlias WDYT?
The text was updated successfully, but these errors were encountered: