| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
the base class when computing the length of the derived class.
class of a Srtructure or Union derived subclass when cloning or modifying the _fields_ array. The old behavior of using the number of elements in the parent class can cause the array to be truncated when it is copied, especially when there are multiple layers of subclassing. Tests are included.
|
I think there is a misunderstanding from your side. size is not the size of the ffi_type_pointer.elements array. It is the size of the structure or the union. |
Sorry, something went wrong.
Now StgDictObject.length of Structure and Union is the number of all fields, including fields of superclases.
|
🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit e294757 🤖 If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
Sorry, something went wrong.
Sorry, something went wrong.
|
🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit cedea96 🤖 If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
Sorry, something went wrong.
|
Thanks @websurfer5 for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Sorry, something went wrong.
|
Thanks @websurfer5 for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, something went wrong.
|
Sorry, @websurfer5 and @serhiy-storchaka, I could not cleanly backport this to 3.11 due to a conflict. cherry_picker 5f3cc90a12d6df404fd6f48a0df1334902e271f2 3.11 |
Sorry, something went wrong.
|
Sorry, @websurfer5 and @serhiy-storchaka, I could not cleanly backport this to 3.12 due to a conflict. cherry_picker 5f3cc90a12d6df404fd6f48a0df1334902e271f2 3.12 |
Sorry, something went wrong.
… layers (pythonGH-13374) The length field of StgDictObject for Structure class contains now the total number of items in ffi_type_pointer.elements (excluding the trailing null). The old behavior of using the number of elements in the parent class can cause the array to be truncated when it is copied, especially when there are multiple layers of subclassing. (cherry picked from commit 5f3cc90) Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
GH-113623 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
… layers (pythonGH-13374) The length field of StgDictObject for Structure class contains now the total number of items in ffi_type_pointer.elements (excluding the trailing null). The old behavior of using the number of elements in the parent class can cause the array to be truncated when it is copied, especially when there are multiple layers of subclassing. (cherry picked from commit 5f3cc90) Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
GH-113624 is a backport of this pull request to the 3.11 branch. |
Sorry, something went wrong.
GH-13374) (GH-113624) The length field of StgDictObject for Structure class contains now the total number of items in ffi_type_pointer.elements (excluding the trailing null). The old behavior of using the number of elements in the parent class can cause the array to be truncated when it is copied, especially when there are multiple layers of subclassing. (cherry picked from commit 5f3cc90) Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com>
GH-13374) (GH-113623) The length field of StgDictObject for Structure class contains now the total number of items in ffi_type_pointer.elements (excluding the trailing null). The old behavior of using the number of elements in the parent class can cause the array to be truncated when it is copied, especially when there are multiple layers of subclassing. (cherry picked from commit 5f3cc90) Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com>
…pythonGH-13374) The length field of StgDictObject for Structure class contains now the total number of items in ffi_type_pointer.elements (excluding the trailing null). The old behavior of using the number of elements in the parent class can cause the array to be truncated when it is copied, especially when there are multiple layers of subclassing. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…pythonGH-13374) The length field of StgDictObject for Structure class contains now the total number of items in ffi_type_pointer.elements (excluding the trailing null). The old behavior of using the number of elements in the parent class can cause the array to be truncated when it is copied, especially when there are multiple layers of subclassing. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…pythonGH-13374) The length field of StgDictObject for Structure class contains now the total number of items in ffi_type_pointer.elements (excluding the trailing null). The old behavior of using the number of elements in the parent class can cause the array to be truncated when it is copied, especially when there are multiple layers of subclassing. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
… layers (pythonGH-13374) (pythonGH-113624) The length field of StgDictObject for Structure class contains now the total number of items in ffi_type_pointer.elements (excluding the trailing null). The old behavior of using the number of elements in the parent class can cause the array to be truncated when it is copied, especially when there are multiple layers of subclassing. (cherry picked from commit 5f3cc90) Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com> Signed-off-by: Michał Górny <mgorny@gentoo.org>
… layers (pythonGH-13374) (pythonGH-113624) The length field of StgDictObject for Structure class contains now the total number of items in ffi_type_pointer.elements (excluding the trailing null). The old behavior of using the number of elements in the parent class can cause the array to be truncated when it is copied, especially when there are multiple layers of subclassing. (cherry picked from commit 5f3cc90) Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com> Signed-off-by: Michał Górny <mgorny@gentoo.org>
… layers (pythonGH-13374) (pythonGH-113624) The length field of StgDictObject for Structure class contains now the total number of items in ffi_type_pointer.elements (excluding the trailing null). The old behavior of using the number of elements in the parent class can cause the array to be truncated when it is copied, especially when there are multiple layers of subclassing. (cherry picked from commit 5f3cc90) Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com> Signed-off-by: Michał Górny <mgorny@gentoo.org>
… layers (pythonGH-13374) (pythonGH-113624) The length field of StgDictObject for Structure class contains now the total number of items in ffi_type_pointer.elements (excluding the trailing null). The old behavior of using the number of elements in the parent class can cause the array to be truncated when it is copied, especially when there are multiple layers of subclassing. (cherry picked from commit 5f3cc90) Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com> Signed-off-by: Michał Górny <mgorny@gentoo.org>
| Back | FazBrowse Home | New Git URL |
Use the size of the fields elements array in the parent class of a Srtructure or Union derived subclass when cloning or modifying the fields array. The old behavior of using the number of elements in the parent class can cause the array to be truncated when it is copied, especially when there are multiple layers of subclassing, which can result in segfaults or exceptions. Tests are included.
https://bugs.python.org/issue18060