Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault in PycRef<_Obj>& operator=(const PycRef<_Obj>& obj) #535

Open
CaledoniaProject opened this issue Jan 21, 2025 · 0 comments
Open

Comments

@CaledoniaProject
Copy link

CaledoniaProject commented Jan 21, 2025

Hi there, I have a segfault issue decompiling a Python3 script. I can't upload the pyc here, so I uploaded the stack dump. Hopefully you can find the issue.

I'm using the master branch,

Process 86212 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x100e)
    frame #0: 0x0000000100026cf8 pycdc`PycRef<ASTBlock>::operator=(this=0x000000016fdf9280, obj=0x000000000000100e) at pyc_object.h:46:17
   43
   44  	    PycRef<_Obj>& operator=(const PycRef<_Obj>& obj)
   45  	    {
-> 46  	        if (obj.m_obj)
   47  	            obj.m_obj->addRef();
   48  	        if (m_obj)
   49  	            m_obj->delRef();
Target 0: (pycdc) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x100e)
  * frame #0: 0x0000000100026cf8 pycdc`PycRef<ASTBlock>::operator=(this=0x000000016fdf9280, obj=0x000000000000100e) at pyc_object.h:46:17
    frame #1: 0x0000000100016cec pycdc`BuildFromCode(code=PycRef<PycCode> @ 0x000000016fdf98f8, mod=0x000000016fdfe850) at ASTree.cpp:1386:26
    frame #2: 0x0000000100034874 pycdc`decompyle(code=PycRef<PycCode> @ 0x000000016fdfac88, mod=0x000000016fdfe850, pyc_output=0x00000001f44121a8) at ASTree.cpp:3357:30
    frame #3: 0x000000010002e8a4 pycdc`print_src(node=PycRef<ASTNode> @ 0x000000016fdfc0a8, mod=0x000000016fdfe850, pyc_output=0x00000001f44121a8) at ASTree.cpp:2951:17
    frame #4: 0x00000001000311e8 pycdc`print_src(node=PycRef<ASTNode> @ 0x000000016fdfdd50, mod=0x000000016fdfe850, pyc_output=0x00000001f44121a8) at ASTree.cpp:3181:17
    frame #5: 0x000000010002dcc4 pycdc`print_src(node=PycRef<ASTNode> @ 0x000000016fdfe450, mod=0x000000016fdfe850, pyc_output=0x00000001f44121a8) at ASTree.cpp:2892:17
    frame #6: 0x0000000100035f3c pycdc`decompyle(code=PycRef<PycCode> @ 0x000000016fdfe7d8, mod=0x000000016fdfe850, pyc_output=0x00000001f44121a8) at ASTree.cpp:3444:5
    frame #7: 0x0000000100005770 pycdc`main(argc=2, argv=0x000000016fdfeda0) at pycdc.cpp:97:9
    frame #8: 0x000000018a7a8274 dyld`start + 2840
(lldb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant