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

address issue where dispatch_io_read cal be called with a data argume… #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mdejong
Copy link

@mdejong mdejong commented Jan 13, 2022

Hello. I ran into a crash in the block passed to dispatch_io_read and from what I could see it seemed to be caused by data being set to nil. This is my attempt to address that crash by setting dataSize to 0. This seemed to be a random one time situation and I have not been able to reproduce the issue since.

@mdejong
Copy link
Author

mdejong commented Jan 13, 2022

FYI, the done flag was true when this crash was hit. The stack trace looked like this:

* thread #7, queue = 'com.apple.libdispatch-io.opq', stop reason = EXC_BAD_ACCESS (code=1, address=0x30)
frame #0: 0x000000018142c480 libdispatch.dylib`dispatch_data_get_size
* frame #1: 0x00000001010af560 ___`__53-[PTProtocol readPayloadOfSize:overChannel:callback:]_block_invoke(.block_descriptor=0x00000002820588a0, done=true, data=0x0000000000000000, error=57) at PTProtocol.m:247:23
frame #2: 0x000000018142be44 libdispatch.dylib`___dispatch_operation_deliver_data_block_invoke + 148

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.

1 participant