strange make error 139
anton wilson
anton.wilson at camotion.com
Tue Feb 18 18:46:46 EST 2003
On Tue, 2003-02-18 at 17:27, anton wilson wrote:
> I'm adding some code to the python interpreter loop in the part where it
> checks things every x bytecodes. I add a function call to the following
> function:
>
> struct pidnode *
> getPidNode( pid_t pid, struct pidnode *table)
> {
> struct pidnode * node;
> struct pidnode * pidanchor;
>
> pidanchor = &(table[pid % NUMSLOTS]);
> for(node = pidanchor->next; node != pidanchor; node = node->next)
> {
> if( pid == node->pid )
> {
> return node;
> }
> }
> return NULL;
> }
>
>
> When I compile I get:
>
> libpython2.2.a(posixmodule.o): In function `posix_tmpnam':
> /root/Python-2.2.2/./Modules/posixmodule.c:4505: the use of `tmpnam_r'
> is dangerous, better use `mkstemp'
> libpython2.2.a(posixmodule.o): In function `posix_tempnam':
> /root/Python-2.2.2/./Modules/posixmodule.c:4455: the use of `tempnam' is
> dangerous, better use `mkstemp'
> case $MAKEFLAGS in \
> *-s*) CC='gcc' LDSHARED='gcc -shared' OPT='-DNDEBUG -g -O3 -Wall
> -Wstrict-prototypes' ./python -E ./setup.py -q build;; \
> *) CC='gcc' LDSHARED='gcc -shared' OPT='-DNDEBUG -g -O3 -Wall
> -Wstrict-prototypes' ./python -E ./setup.py build;; \
> esac
> make: *** [sharedmods] Error 139
>
This seems to be a problem related to for loops. I insert a for loop
like the following code in ceval.c and the compilation process freezes,
or enters into an infinite loop. I also notice that python is running in
the background. What exactly is python doing during the make process?
#ifdef WITH_THREAD
for(;;)
{
}
if (interpreter_lock) {
/* Give another thread a chance */
if (PyThreadState_Swap(NULL) != tstate)
Py_FatalError("ceval: tstate mix-up");
PyThread_release_lock(interpreter_lock);
/* Other threads may run now */
PyThread_acquire_lock(interpreter_lock, 1);
if (PyThreadState_Swap(tstate) != NULL)
Py_FatalError("ceval: orphan tstate");
}
#endif
More information about the Python-list
mailing list