function causing core dump

Michael Hudson mwh at python.net
Mon May 10 13:43:37 EDT 2004


"Xaver Hinterhuber" <xaver_hinterhuber at web.de> writes:

> Hello pythonistas,
> 
> I build a function with the following code segment:
> 
>     codeObject = new.code(
>       0, # argcount
>       0, # nlocals
>       0, # stacksize
>       0, # flags
>       codeString, # code
>       (), # consts
>       (), # names
>       (), # varnames
>       'content', # filename
>       'content', # name
>       3, # first line number
>       codeString # lnotab
>       )
>     f = new.function(codeObject, dict, 'f')
>     f()
> 
> Everything runs fine, until the function is called with f().
> When python tries to execute f(), the core dump happens.
> I don't have any clue why python core dumps.
> The codeString is nothing complex, its a one-liner.
> Could you plz give me some tips what I have to do?

Doesn't the documentation for the new module have warnings plastered
all over it?  Why are you using it?

Cheers,
mwh

-- 
  About the use of language: it is impossible to sharpen a
  pencil with a blunt axe.  It is equally vain to try to do
  it with ten blunt axes instead.
      -- E.W.Dijkstra, 18th June 1975. Perl did not exist at the time.



More information about the Python-list mailing list