ARROW-6618: [Python] Fix read_message() segfault on end of stream#5437
ARROW-6618: [Python] Fix read_message() segfault on end of stream#5437pitrou wants to merge 2 commits intoapache:masterfrom
Conversation
| check_status(ReadMessage(c_stream, &result.message)) | ||
|
|
||
| if result.message == nullptr: | ||
| raise EOFError("End of Arrow stream") |
There was a problem hiding this comment.
You can also have a null message if it was an invalid message (eg pa.read_message(b"invalidbuffer") also gives this error now). Maybe the error message should indicated that? Although this is probably a less typical case to do (I only tried that while trying to find a minimal reproducible example for the segfault).
There was a problem hiding this comment.
I don't know. We should perhaps make error checking smarter on the C++ side. Can you open a separate JIRA?
|
I'm taking a quick look at this |
|
There's some other weird stuff here, for example No idea why it takes 100ms to fail |
|
Ah, it's allocating memory unconditionally. I'll push some fixes to this branch |
… of IPC message input
|
OK now I also addressed the unneeded memory allocation issue (not sure how to easily test that) |
No description provided.