peadar / pstack

Print stack traces from running processes, or core files. Supports aarch64, x86_64, and i386

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Python] Negative longs are skipped

nskobelevs opened this issue · comments

When using the -a flag to show locals, negative longs aren't printed correctly

def func(a):
    sleep(1000000)

func(-1L) # L not needed for Python 3

Output:

---- interpreter @55e9fb6742a0 -----
pthread: 0x7fc8df07c740, lwp 17975
    func in test/negativeLong.py:4
        fastlocals:
            "a"=(skip massive object -1)
    <module> in test/negativeLong.py.py:6
...

Issue occurs in both versions of python but more prevalent in Python 3 as PyIntObject was removed and all numbers are longs by default.