Message255815
Hi Stefan,
> Yes, I dislike that, too. The question is why gcc has supported
> the "struct hack" for more than 20 years but needs an annotation
> just for MPX.
The "struct hack" represents a problem for MPX because it intentionally exceeds the bounds of the array declared inside in order to support a variable sized structure. Without the Py_VARIABLE_SIZE annotation, MPX will generate a bounds violation when accessing outside the declared size of the array.
> Is the annotation also needed for the C99 version (ob_array[])?
I tested and for the C99 version the annotation is not needed. Apparently ob_array inherits the bounds of the structure in this case.
Regards,
Florin |
|
Date |
User |
Action |
Args |
2015-12-03 11:42:22 | florin.papa | set | recipients:
+ florin.papa, rhettinger, pitrou, vstinner, r.david.murray, skrah, zach.ware |
2015-12-03 11:42:22 | florin.papa | set | messageid: <1449142942.88.0.327093836492.issue25300@psf.upfronthosting.co.za> |
2015-12-03 11:42:22 | florin.papa | link | issue25300 messages |
2015-12-03 11:42:22 | florin.papa | create | |
|