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 | amaury.forgeotdarc |
|---|---|
| Recipients | amaury.forgeotdarc |
| Date | 2008年02月06日.01:01:05 |
| SpamBayes Score | 0.07271394 |
| Marked as misclassified | No |
| Message-id | <1202259671.39.0.146513031133.issue2016@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
The following script exploits a comment in funcobject.c:
/* XXX This is broken if the caller deletes dict items! */
Because the code only borrows references to the items, it is possible to
have them destroyed before they are copied into the called frame.
class Name(str):
def __eq__(self, other):
del x[self]
return str.__eq__(self, other)
def __hash__(self):
return str.__hash__(self)
x = {Name("a"):1, Name("b"):2}
def f(a, b): print a,b
f(**x) # Segfault |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年02月06日 01:01:11 | amaury.forgeotdarc | set | spambayes_score: 0.0727139 -> 0.07271394 recipients: + amaury.forgeotdarc |
| 2008年02月06日 01:01:11 | amaury.forgeotdarc | set | spambayes_score: 0.0727139 -> 0.0727139 messageid: <1202259671.39.0.146513031133.issue2016@psf.upfronthosting.co.za> |
| 2008年02月06日 01:01:05 | amaury.forgeotdarc | link | issue2016 messages |
| 2008年02月06日 01:01:05 | amaury.forgeotdarc | create | |