-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Open
Labels
ImplementationIssues describing a semantics-preserving change to the Go implementation.Issues describing a semantics-preserving change to the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Description
Currently, we don't make any attempt to detect whether an allocation is eagerly zeroed during GC sweeping by the runtime/secret support code. When that allocation is reused later, it will get zeroed again, even though we could infer that it already contains zeros.
I don't think the overhead of storing individual objects zeroed state is worth it and the double zeroing shouldn't be too expensive because secret allocations are meant to be fairly small. Maybe we could implement a separate class of spans for secret allocations, but that's a lot of complexity for not a lot of gain.
Metadata
Metadata
Assignees
Labels
ImplementationIssues describing a semantics-preserving change to the Go implementation.Issues describing a semantics-preserving change to the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.