Conversation
8a505f8 to
59c0f85
Compare
59c0f85 to
6fd0306
Compare
|
Why do we need to keep the memory copying? Can any malfunction be reproduced? If so, adding a test case would probably be a good idea. |
It's needed to get rid of use-after-free errors that are plaguing CI. I am not sure if it actually causes a difference in behaviour as I haven't observed any and I didn't notice any new issues being raised about it. See https://dev.azure.com/phpazuredevops/PHP/_build/results?buildId=23771&view=ms.vss-test-web.build-test-results-tab After 23 days I forgot the details of my debugging, but if I remember correctly, depending on how the prepare is called, we might expect mysqli to free the object or not. Thus, mysqlnd can't do it in place and has to first create successfully a new PS and then swap it and destroy the old one. I don't have the time to start a debugger now to collect details, but this should fix the use-after-free and not change anything in the behaviour. I don't think we can catch this in tests. |
|
@kamil-tekiela, it seems the PHP-8.1 and master builds are failing now; can you please have a look? |
|
Thanks, I forgot to change the two lines when merging. It should be all green now. |
This is partially reversing my previous change from 93a8d5c.
The fix remains in place, but we must keep the memory copying.