fatal error: Internal error: 'Access violation'

Started by TimoVJL, October 23, 2013, 11:22:38 AM

Previous topic - Next topic

TimoVJL

no opt
civetweb.c(2574): fatal error: Internal error: 'Access violation' at 0x0048049c.

with -Ot
md5.inl(212): fatal error: Internal error: get_rule_number().
May the source be with you

Bitbeisser

Quote from: timovjl on October 23, 2013, 11:22:38 AM
no opt
civetweb.c(2574): fatal error: Internal error: 'Access violation' at 0x0048049c.

with -Ot
md5.inl(212): fatal error: Internal error: get_rule_number().
Looks like a user error in the md5.inl file to me...

In line 214, the first line within the function md5_process, you have a lone "md5_word_t " with no variable name directly assigned...

Ralf

TimoVJL

Quote from: Bitbeisser on October 23, 2013, 11:32:50 PM
Quote from: timovjl on October 23, 2013, 11:22:38 AM
no opt
civetweb.c(2574): fatal error: Internal error: 'Access violation' at 0x0048049c.

with -Ot
md5.inl(212): fatal error: Internal error: get_rule_number().
Looks like a user error in the md5.inl file to me...

In line 214, the first line within the function md5_process, you have a lone "md5_word_t " with no variable name directly assigned...

Ralf
Variables are in following lines    md5_word_t
    a = pms->abcd[0], b = pms->abcd[1],
    c = pms->abcd[2], d = pms->abcd[3];
May the source be with you

frankie

There is a problem on BYTE_ORDER definition and also on _getcwd local declaration.
I upload a brutally modified version. You can refine the modifications.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

TimoVJL

Quote from: frankie on October 24, 2013, 01:25:58 PM
There is a problem on BYTE_ORDER definition and also on _getcwd local declaration.
I upload a brutally modified version. You can refine the modifications.
use -DARCH_IS_BIG_ENDIAN=0 -D_lseeki64=_lseek64
and compile with __cdecl if 32-bit.
Only change in civetweb.c...
/* Visual Studio 6 does not know __func__ or __FUNCTION__
   The rest of MS compilers use __FUNCTION__, not C99 __func__
   Also use _strtoui64 on modern M$ compilers */
#if defined(_MSC_VER) && _MSC_VER < 1300
#ifndef __POCC__     // <--- INSERT LINE
#define STRX(x) #x
#define STR(x) STRX(x)
#define __func__ __FILE__ ":" STR(__LINE__)
#define strtoull(x, y, z) (unsigned __int64) _atoi64(x)
#define strtoll(x, y, z) _atoi64(x)
#endif                     // <--- INSERT LINE
#else
#define __func__  __FUNCTION__
#define strtoull(x, y, z) _strtoui64(x, y, z)
#define strtoll(x, y, z) _strtoi64(x, y, z)
#endif /* _MSC_VER */
...
If someone have VS 2013, please test original code for us from here
May the source be with you