Pelles C forum

Pelles C => Bug reports => Topic started by: TimoVJL on October 23, 2013, 11:22:38 AM

Title: fatal error: Internal error: 'Access violation'
Post by: 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().
Title: Re: fatal error: Internal error: 'Access violation'
Post by: Bitbeisser on October 23, 2013, 11:32:50 PM
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
Title: Re: fatal error: Internal error: 'Access violation'
Post by: TimoVJL on October 24, 2013, 10:52:09 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
Code: [Select]
    md5_word_t
    a = pms->abcd[0], b = pms->abcd[1],
    c = pms->abcd[2], d = pms->abcd[3];
Title: Re: fatal error: Internal error: 'Access violation'
Post by: 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.
Title: Re: fatal error: Internal error: 'Access violation'
Post by: TimoVJL on October 24, 2013, 05:31:08 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
Code: [Select]
...
/* 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 (https://github.com/sunsetbrew/civetweb/)