compiler problem....

  • Thread starter Thread starter ask
  • Start date Start date
A

ask

Hi NG

I encountered a wierd problem I cant seem to solve. I have a local function
wich I call with an integer (0), but as soon as I step into the local
function the integer changes value (-858993460). I use the new MS Dev. Env.
2003.

The code looks like this:

=== header file
class CABComparisonListControl
{
public:
void initControls();
....
private:
void reloadSettingsList( int indx );
....
}

=== cpp file
void CABComparisonListControl::reloadSettingsList( int indx )
{
signed int tmp = RationaleIndx;
....
}

=== calling the local function
void CABComparisonListControl::initControls()
{
....
reloadSettingsList ( 0 );
....
}

Problem:
When I call the "reloadSettingsList" from "initControls()" the "int indx"
changes value from zero to -858993460. When I debug into the
"reloadSettingsList" the "int indx" is zero at the first line, but entering
the actual function "indx" becomes invalid. Following is the assembly, the
"indx" changes value at "01EB6E82 rep stos dword ptr [edi]":

=== assembly of
void CABComparisonListControl::reloadSettingsList( int indx )
{
01EB6E50 push ebp
01EB6E51 mov ebp,esp
01EB6E53 push 0FFFFFFFFh
01EB6E55 push offset
__ehhandler$?reloadSettingsList@CABComparisonListControl@@AAEXH@Z (1F67FF0h)
01EB6E5A mov eax,dword ptr fs:[00000000h]
01EB6E60 push eax
01EB6E61 mov dword ptr fs:[0],esp
01EB6E68 sub esp,1E8h
01EB6E6E push ebx
01EB6E6F push esi
01EB6E70 push edi
01EB6E71 push ecx
01EB6E72 lea edi,[ebp-1F4h]
01EB6E78 mov ecx,7Ah
01EB6E7D mov eax,0CCCCCCCCh
01EB6E82 rep stos dword ptr [edi]
01EB6E84 pop ecx
01EB6E85 mov dword ptr [ebp-14h],ecx
signed int tmp = RationaleIndx;
....

Well... I tried rebuilding the whole solution, cleaning various projects
etc. Does this look like a compiler error?

Thnx.
Ask
 
Back
Top