Message52496
| Author | agthorr |
|---|---|
| Recipients | |
| Date | 2007-04-20.22:17:46 |
| SpamBayes Score | |
| Marked as misclassified | |
| Message-id | |
| In-reply-to |
| Content | |
|---|---|
Here's a succinct summary of the problem: >>> x = [0] * 2**20 >>> x *= 2**20 Segmentation fault (core dumped) >>> x = [0] * 2**20 >>> x * 2**20 [] >>> The problem is that list_repeat()'s check for an overflow is flawed, and list_inplace_repeat() doesn't check at all. Attached is a patch that adds a correct check to both functions. With the patch, both variations throw a MemoryError exception. The patch is against Python 2.5, but should also fix 2.5.1/2.6/3.0. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2007-08-23 15:58:11 | admin | link | issue1704621 messages |
| 2007-08-23 15:58:11 | admin | create | |