This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients barry, serhiy.storchaka, vstinner, xiang.zhang
Date 2018-07-11.10:13:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1531304032.53.0.56676864532.issue34084@psf.upfronthosting.co.za>
In-reply-to
Content
> Could you add a test in test_flufl.py that will fail with not patched code?

It seems like PyObject_FREE() is never called with the static string "with Barry as BDFL, use '<>' instead of '!='".

When parsetok() goes to code path (1):

                err_ret->text = "with Barry as BDFL, use '<>' "
                                "instead of '!='";

Later, it goes to code path (2) as well:

        if (tok->buf != NULL) {
            ...
            err_ret->text = (char *) PyObject_MALLOC(len + 1);

Hum, I modified my PR to removed *dead code*:

                err_ret->text = "with Barry as BDFL, use '<>' "
                                "instead of '!='";

> This issue and issue34080 look unrelated to me. They can be fixed independently.

In practice, both issues are related and it seems easier to me to fix them both at the same time ;-)
History
Date User Action Args
2018-07-11 10:13:52vstinnersetrecipients: + vstinner, barry, serhiy.storchaka, xiang.zhang
2018-07-11 10:13:52vstinnersetmessageid: <1531304032.53.0.56676864532.issue34084@psf.upfronthosting.co.za>
2018-07-11 10:13:52vstinnerlinkissue34084 messages
2018-07-11 10:13:52vstinnercreate