> > (gdb) x/s $esp-8 
> > 0x826b400 <dtablecount+6528>:    "/wd0/B/usr-src/lib/libc_r/uthread/uthread_dup2.c"
> > (gdb) 
> 
> I guess it is the "thread_fd_lock_debug/_thread_fd_unlock_debug"
> calls with __FILE__ that push this on the stack.  I'll build a
> debuggable libc_r and see I see.

Well, of course with the library compiled with -g and without -O the
problem went away.  However, I do have a call to "dup2" for some
threads in a function installed with "pthread_switch_add_np"

> #ifdef HAVE_PTHREAD_NP
>     pthread_switch_add_np(px_switch);
> #endif

in order to mimic the vxWorks behavior of having a different file
0, 1, and 2 per thread.   By disabling this the behavior goes
away, apparently what I'm doing is illegal.

Peter

--
Peter Dufault ([EMAIL PROTECTED])   Realtime development, Machine control,
HD Associates, Inc.               Fail-Safe systems, Agency approval

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to