On Tue., 1 Oct. 2019, 3:05 am Nick Coghlan, <ncogh...@gmail.com> wrote:

>
> The only outcome I'd consider undesirable is shipping a public API
> that's more awkward to use than it needs to be, doesn't conform to the
> accepted version of the PEP, and doesn't protect against most of the
> potential sources of segfaults arising from an ABI mismatch (and could
> even cause them if the supplied "struct_size" value were to be trusted
> directly, rather than being treated as a lookup value into a set of
> known-valid struct sizes. The currently checked in code at least
> doesn't do that, but that's only because it ignores the new
> struct_size field entirely when making the memset() calls to
> initialise the config structs).
>

My apologies, the "only" here is incorrect, as the existing code also has
guards to make sure that the passed in struct size is exactly the same as
the interpreter's compile time size (it's effectively a lookup set with one
member).

Cheers,
Nick.


>
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/IHRN6EFQ3OVPCJVDUIQRU4GVKUA3SYQC/

Reply via email to