Skip to content
New issue

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

cloning is incorrectly implemented #7381

Open
jmkinzer opened this issue Feb 6, 2025 · 0 comments
Open

cloning is incorrectly implemented #7381

jmkinzer opened this issue Feb 6, 2025 · 0 comments
Labels
untriaged New issue has not been triaged

Comments

@jmkinzer
Copy link

jmkinzer commented Feb 6, 2025

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

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged label Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged New issue has not been triaged
Projects
None yet
Development

No branches or pull requests

1 participant