Skip to content

cloning is incorrectly implemented #7381

Open
@jmkinzer

Description

@jmkinzer

The CloneAs* methods for PrimitiveDataFrameColumn are incorrect. They seem to assume 1 input buffer will become 1 output buffer. This can't be correct in the case where for example:

  • The original buffer is at MaxCapacity elements => therefore has size in bytes of ArrayUtility.ArrayMaxSize
  • The new buffer has a larger sizeof(T)

As an experiment I set the ArrayMaxSize to a smaller value (say 32768). In integer elements this will therefore be 8192 but in double elements only 4096. However the clone routine will still attempt to allocate a buffer of 8192 doubles = 65K bytes. Running an operation that would cause a clone I indeed see the expected exception:

Image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions