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 christian.heimes, methane, vstinner, xiang.zhang
Date 2016-09-10.06:39:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1473489573.8.0.744238300858.issue28042@psf.upfronthosting.co.za>
In-reply-to
Content
>>>     "&mp->ma_keys->dk_indices.as_1[mp->ma_keys->dk_size * ((mp->ma_keys->dk_size <= 255L) ? 1UL : ((mp->ma_keys->dk_size <= 65535L) ? 2UL : ((mp->ma_keys->dk_size <= 4294967295L) ? 4UL : 8UL)))]" evaluates to an address that is at byte offset 255 of an array of 8 bytes.

Oh. That's why dictobject.c uses a trick. The C structure uses a fixed buffer of 8 bytes, but the actual allocated memory block has the right size. All these warnings are false positive, don't worry :-)

We might use C99 "buffer[]" syntax, remove dk_indices from the structure, ignore the false alarm, or write a Coverity model for this one. Right now, I would prefer to not touch the C code just for a false alarm ;-)
History
Date User Action Args
2016-09-10 06:39:33vstinnersetrecipients: + vstinner, christian.heimes, methane, xiang.zhang
2016-09-10 06:39:33vstinnersetmessageid: <1473489573.8.0.744238300858.issue28042@psf.upfronthosting.co.za>
2016-09-10 06:39:33vstinnerlinkissue28042 messages
2016-09-10 06:39:33vstinnercreate