Sir
i am very to this and trying to implement syslog in my windows porting application.
To match linux i thought of impmenting syslog-win32 in windows
On that implementation i suddenly see that syslogd.exe is crashed and it pointed some exception
So i little modified the code in main.c
int main( int argc, char* argv[] ) { static int help_flag = 0; static int version_flag = 0; static int install_flag = 0; static int remove_flag = 0; static int service_flag = 0; static int shutdown_flag = 0; char *instance_name = NULL; char *priority = NULL; int getopt_failure = 0; WSADATA wsd; char name_buf[ MAX_COMPUTERNAME_LENGTH + 1 ]; DWORD size; LoadLibrary("exchndl.dll"); //adding DRMINGW dll for handling JIT
// SetUnhandledExceptionFilter( exception_handler ); //Commented this exception handler
-----
=====
=====
}
Below is the exception trace from drmingw implementation
syslogd.exe caused an Access Violation at location 1001EC1E in module libglib-2.0-0.dll Reading from location 00000014.
Registers:
eax=00000000 ebx=00000000 ecx=ffffffff edx=01418ea8 esi=004f6f98 edi=014174a8
eip=767a98da esp=0022fa70 ebp=00000000 iopl=0 nv up ei pl nz na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010206
AddrPC Params
Registers:
eax=00000000 ebx=00000000 ecx=75c36a18 edx=77aa70b4 esi=00412bf4 edi=00000000
eip=77aa70b4 esp=01b6fe4c ebp=01b6feb0 iopl=0 nv up ei pl nz ac po cy
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000217
AddrPC Params
77AA70B4 00000000 00000000 01B6FF2C ntdll.dll!KiFastSystemCallRet
77A92148 00412BF4 00000037 0000FFE3 ntdll.dll!EtwEventEnabled
0040658C 004F0000 00000000 01B6FF14 syslogd.exe!udp_listener_thread [c:\syslog\syslog-win32-0.3\daemon/udp_listener.c @ 106]
767A98CD 00000000 21DFD8EC 00000000 MSVCRT.dll!free
767B1287 01B6FF94 75F03C45 004F6FD8 MSVCRT.dll!_itow_s
767B1328 004F6FD8 01B6FFD4 77AC37F5 MSVCRT.dll!_endthreadex
75F03C45 004F6FD8 778FE6F3 00000000 kernel32.dll!BaseThreadInitThunk
77AC37F5 767B12E5 004F6FD8 00000000 ntdll.dll!RtlInitializeExceptionChain
77AC37C8 767B12E5 004F6FD8 00000000 ntdll.dll!RtlInitializeExceptionChain
Registers:
eax=0000011e ebx=77a8fe90 ecx=005f65e8 edx=7ffe0300 esi=005f56b0 edi=00000000
eip=77aa70b4 esp=01e6fdf4 ebp=01e6ff88 iopl=0 nv up ei ng nz ac pe cy
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000293
AddrPC Params
77AA70B4 00000000 01E6FFD4 77AC37F5 ntdll.dll!KiFastSystemCallRet
75F03C45 005F56B0 77DFE6F3 00000000 kernel32.dll!BaseThreadInitThunk
77AC37F5 77A8FD0F 005F56B0 00000000 ntdll.dll!RtlInitializeExceptionChain
77AC37C8 77A8FD0F 005F56B0 00000000 ntdll.dll!RtlInitializeExceptionChain
Please guide...
the exception point to the below line::
memcpy( msg, &message, sizeof(struct raw_message) );