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.
Created on 2008年11月23日 12:28 by mark.dickinson, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| longobject_casts.patch | mark.dickinson, 2008年11月23日 12:28 | |||
| Messages (3) | |||
|---|---|---|---|
| msg76267 - (view) | Author: Mark Dickinson (mark.dickinson) * (Python committer) | Date: 2008年11月23日 12:28 | |
This patch fixes 3 classes of bugs in Objects/longobject.c: (1) declarations of a variable (usually a counter into the digits of a PyLong) as int instead of Py_ssize_t. (2) missing (twodigits) casts from multiplies and shifts. (3) use of '<<' on negative values in _PyLong_AsByteArray. This may lead to undefined behaviour, according to the C standards. (See C99, section 6.5.7, paragraph 4). These bugs haven't manifested themselves in practice. For (1), there's only a problem when dealing with huge integers (more than 2**31 digits). The bugs in (2) can only affect platform where the C 'int' type has fewer than 32 bits. (3) could potentially conflict with future compiler optimizations, but doesn't seem to be a problem right now. For these reasons I don't think these fixes should be backported to 2.5.3. |
|||
| msg76821 - (view) | Author: Mark Dickinson (mark.dickinson) * (Python committer) | Date: 2008年12月03日 09:54 | |
See also issue 4497 for some compiler warnings that need to be silenced. |
|||
| msg80456 - (view) | Author: Mark Dickinson (mark.dickinson) * (Python committer) | Date: 2009年01月24日 16:01 | |
Fixed in r68890, r68891, r68895 and r68896 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:41 | admin | set | github: 48643 |
| 2009年01月24日 16:01:56 | mark.dickinson | set | status: open -> closed messages: + msg80456 |
| 2008年12月03日 09:54:42 | mark.dickinson | set | assignee: mark.dickinson messages: + msg76821 |
| 2008年11月23日 12:28:25 | mark.dickinson | create | |