[MacPorts] #67741: python311 @3.11.4_0 crashes with SEG Fault if py311-pyobjc is activated and help('modules') is used

MacPorts noreply at macports.org
Wed Jul 12 22:43:26 UTC 2023


#67741: python311 @3.11.4_0 crashes with SEG Fault if py311-pyobjc is activated and
help('modules') is used
-----------------------+------------------------------------
 Reporter:  snowflake  |      Owner:  jmroot
     Type:  defect     |     Status:  assigned
 Priority:  Normal     |  Milestone:
Component:  ports      |    Version:  2.8.99
 Keywords:             |       Port:  python311 py311-pyobjc
-----------------------+------------------------------------
 In an interactive Python3 session, I typed `help('modules')` at the
 prompt.

 After a couple of seconds Python crashed with a SEG Fault.

 I copied `pydoc.py` from the Macports folder to a folder where I could
 edit it.

 I modified `pydoc.py` like this:
 {{{
 Please wait a moment while I gather a list of all available modules...

 ''')
             modules = {}
             def callback(path, modname, desc, modules=modules):
                 print(path, modname) # <<< Debugging statement >>>
                 if modname and modname[-9:] == '.__init__':
                     modname = modname[:-9] + ' (package)'
                 if modname.find('.') < 0:
                     modules[modname] = 1
 }}}
 I then ran my modified pydoc.py as a standalone Python script with the
 appropriate command to generate a list of modules. A long list of
 debugging statements was displayed and then Python crashed.

 I searched Macports for the module which was causing the crash and I found
 it was in py311-pyobjc. I deactivated py311-pyobjc and tried again. This
 time the list of modules did not crash.

 I have also tested this with python310 with the same result.

-- 
Ticket URL: <https://trac.macports.org/ticket/67741>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list