dxbjavid commented on PR #3607: URL: https://github.com/apache/thrift/pull/3607#issuecomment-4815200885
both fixed. for the link issue i went with adding thrift_memory_buffer.o to testframedtransport_LDADD (and testbufferedtransport_LDADD) rather than including the .c directly. the readcheck test can include thrift_memory_buffer.c because it's the only transport source it pulls in, but these two files already #include thrift_framed_transport.c / thrift_buffered_transport.c, and a second transport .c in the same translation unit collides on the file-local PROP_0 enum. linking the object keeps it in its own unit and the autotools build resolves cleanly. for the missing coverage i added ReadAcrossBuffer to testbufferedtransport.c. the buffered read path never pre-buffers on its own, so to reach the have > 0 branch the test seeds the read buffer with 96 leftover bytes (well past sizeof(GByteArray)) and then reads across it through a memory buffer. under asan it reports a heap-buffer-overflow at thrift_buffered_transport.c:96 against the old memcpy and passes with the data-member copy. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
