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

Fix segfault writing to no longer valid column writer #401

Merged
merged 4 commits into from
Nov 28, 2023

Conversation

adamreeve
Copy link
Contributor

Fixes #400

@@ -159,7 +159,25 @@ public LogicalColumnWriter<TElement> LogicalWriterOverride<TElement>(int bufferL
protected static extern unsafe IntPtr TypedColumnWriter_WriteBatchSpaced_FixedLenByteArray(
IntPtr columnWriter, long numValues, short* defLevels, short* repLevels, byte* validBits, long validBitsOffset, FixedLenByteArray* values);

protected readonly IntPtr Handle;
protected IntPtr Handle
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe we need to worry about binary compatibility here, because Handle is a protected member and the ColumnWriter and ColumnWriter<TValue> constructors are both internal, so it shouldn't be possible for code outside of ParquetSharp to be accessing this member.

Copy link
Contributor

@marcin-krystianc marcin-krystianc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me.

@adamreeve adamreeve marked this pull request as ready for review November 27, 2023 21:56
@adamreeve adamreeve merged commit b801b01 into G-Research:master Nov 28, 2023
28 checks passed
@adamreeve adamreeve deleted the column-writer-crash branch November 28, 2023 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: Segfault when writing to a column writer after getting the next column writer
2 participants