Skip to content

Violations of pointer passing rules #584

@ansiwen

Description

@ansiwen

At least at one place we hand over Go pointers to the Ceph API that gonna get stored in a handler registry after the call returns, which violates the pointer passing rules:

go-ceph/rados/read_op.go

Lines 80 to 81 in 312e4cf

&gos.more,
&gos.rval,

So there is no guarantee that the pointers remain valid.

With the iterator right before:

&gos.iter,

we are safe, since - as far as I can tell - it doesn't get stored anywhere.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions