Message259665
The problem has to do with refcounting when an error occurs. Adjusting the title accordingly.
I'm not sure yet if the problem is in PyObject_Format(), or in handling errors in the eval loop when processing FORMAT_VALUE opcodes. I'm slowly tracking it down. It doesn't happen with format(), so I suspect it's in FORMAT_VALUE.
Here's an example showing the error with a large, non-cached int. You need to call it twice to trigger the refcount problem.
>>> f'{1000:j}'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: Unknown format code 'j' for object of type 'int'
>>> f'{1000:j}'
Fatal Python error: Objects/tupleobject.c:233 object at 0x7f904006b360 has negative ref count -2604246222170760230
Current thread 0x00007f9041278700 (most recent call first):
Aborted (core dumped) |
|
Date |
User |
Action |
Args |
2016-02-05 15:14:44 | eric.smith | set | recipients:
+ eric.smith, petr.viktorin, martin.panter |
2016-02-05 15:14:44 | eric.smith | set | messageid: <1454685284.03.0.473409112762.issue26287@psf.upfronthosting.co.za> |
2016-02-05 15:14:44 | eric.smith | link | issue26287 messages |
2016-02-05 15:14:43 | eric.smith | create | |
|