Overview
| Artifact ID: | 4c31376aadbc06b7dd7d995f891a1aac81ffc292 |
|---|---|
| Ticket: | 1582671fffffffffffffffffffffffffffffffff
crash in tclAsync.c:Tcl_AsyncDelete() |
| User & Date: | nobody on 2006-10-23 07:22:22 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
hmmm 8.4.13 is obsolete but I only downloaded it a few days ago :-) OK, to business. I am running Tcl 8.4.13 inside AOLServer 4.5.0. patch is... james@redhat::~/tcl/tcl8.4.13/generic [295] diff -C3 tclAsync.c.orig tclAsync.c *** tclAsync.c.orig 2006-10-23 16:31:11.000000000 +1000 --- tclAsync.c 2006-10-23 16:32:27.000000000 +1000 *************** *** 292,305 **** if (tsdPtr->firstHandler == NULL) { tsdPtr->lastHandler = NULL; } } else { prevPtr = tsdPtr->firstHandler; while (prevPtr->nextPtr != asyncPtr) { prevPtr = prevPtr->nextPtr; } ! prevPtr->nextPtr = asyncPtr->nextPtr; ! if (tsdPtr->lastHandler == asyncPtr) { ! tsdPtr->lastHandler = prevPtr; } } Tcl_MutexUnlock(&tsdPtr->asyncMutex); --- 292,311 ---- if (tsdPtr->firstHandler == NULL) { tsdPtr->lastHandler = NULL; } + } else if (tsdPtr->firstHandler == NULL) { + /* empty list */ } else { prevPtr = tsdPtr->firstHandler; while (prevPtr->nextPtr != asyncPtr) { prevPtr = prevPtr->nextPtr; } ! if (prevPtr == NULL) ! ; /* wasn't in the list */ ! else { ! prevPtr->nextPtr = asyncPtr->nextPtr; ! if (tsdPtr->lastHandler == asyncPtr) { ! tsdPtr->lastHandler = prevPtr; ! } } } Tcl_MutexUnlock(&tsdPtr->asyncMutex); That patch seems to work, so I assume that in my case the 'Tcl_AsyncHandler async' is not in the list. How that happens is a question for another day. I have the following setup: config.status # This directory was configured as follows, # on host redhat.home.jmsh.net: # # ./configure --prefix=/usr/local/tcl --enable-threads Linux redhat.home.jmsh.net 2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2003 i686 i686 i386 GNU/Linux actually this is REDHAT 9 - nice and old A quick Google search will reveal a German lady Michelle having a similar problem a year or so ago. Keep in mind that I am not really sure what is happening in the code here, I was just trying to stop it crashing. In this case Tcl_AsyncDelete() was being called an instant before pthread_exit(). That would suggest to me that I have introduced a memory leak. I assume that you would know the consequences and therefore the proper response to this function 'failing'. Maybe an exception rather than the silent failure I have introduced. Let me know if I can be of assistance. Thanks, James Burton [email protected] - foundin changed to: "obsolete: 8.4.13"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "49. Threading"
- title changed to: "crash in tclAsync.c:Tcl_AsyncDelete()"
- type changed to: "Bug"