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 Padowan
Recipients Padowan
Date 2013-07-11.06:36:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In Python/importdl.c around line 99 in the function _PyImport_LoadDynamicModule() you can find the code:
  def = PyModule_GetDef(m);
  def->m_base.m_init = p;

If the module m, which is returned from a newly imported extension, is not created by PyModule_Create() but in some other way then PyModule_GetDef(m) will return NULL. The next line will then dereference a NULL pointer and crash. 

I suggest a check for this is added:
  def = PyModule_GetDef(m);
  if(def != NULL) 
    def->m_base.m_init = p;
Date User Action Args
2013-07-11 06:36:51Padowansetrecipients: + Padowan
2013-07-11 06:36:51Padowansetmessageid: <>
2013-07-11 06:36:51Padowanlinkissue18426 messages
2013-07-11 06:36:50Padowancreate