Closed adrian-gierakowski closed 6 years ago
Hi, thanks for the pull.
Are you sure that there is a bug in realloc
?
I checked it many times, should work just fine...
Thanks for merging. There is a bug in 92b47664b20201eb95dc1526b83a97ae13179831 though: the argv array needs to be refilled if realloc results in an actual reallocation ( which didn't happen when I tested locally but does on Travis). I can fix that tomorrow
On Thu, 29 Mar 2018, 23:36 Arseniy Pavlenko, notifications@github.com wrote:
Merged #18 https://github.com/h0x91b/redis-fast-driver/pull/18.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/h0x91b/redis-fast-driver/pull/18#event-1548927831, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUJwe4sHc-MWrsh4vd4F24DK2wM2T7Aks5tjWHWgaJpZM4TA9zp .
I fixed it already in #19
and some other improvements ( see individual commits )
the bug must have been introduced in b7cebab75f221b22177236eb3f09ad29cdc833fb
let me know if you are unhappy with any of the commits and I can remove them. I guess you might object to 3e6d28c2ac4b5dd85d67bfd6419b571fe1dc3905 given that you have used the doubling strategy in the past and opted to change it, but the current one leads to far too many reallocations when you need to send a command greatly exceeding current size of the buffer.