Hi All,

There is a bug in the logging functions debug, info, warning, error and
panic 
which cause a crash when called from a thread that has a thread id larger 
than 1024, i.e. gwthread_self returns value > 1024

In the log module there is an array for mapping threads to logfiles:

#define THREADTABLE_SIZE 1024
static unsigned int thread_to [ (long) THREADTABLE_SIZE ];

The log functions use this to identify which log file to write the data to, 
as in following:

void error(int e, const char *fmt, ...) 
{
    if ((e = thread_to[gwthread_self()])) {     /**** Relevent line ***/
        FUNCTION_GUTS_EXCL(GW_ERROR, "");
    } else {
        FUNCTION_GUTS(GW_ERROR, "");
    }
}

Unfortunately if gwthread_self returns a value greater than 1024 then
problems
occur.

Comments or suggestions appreciated!

Kindest Regards
Michael.






<<attachment: winmail.dat>>

Reply via email to