Re: Encrypt/ Decrypt in NdisIM with Ethernet



That again could be because stack (and the variables on it) gets corrupted.

I can only help you as much as you are willing to elaborate what is it your
code doing. Short of that, I can only give you this generic advice:
Make sure your stack is not getting corrupted. For example what is it "do
something here" that your code does? Do you call another function? Do you
write to an array or initialize a data structure? Also watch out for
initializations that should take the size of the structure but you are
passing the size of a -pointer- to the structure (or the other way around.)
things like that.

And needless to say, make sure you do not end up with a recursive calls. or
huge data structures on the stack.

-ali

--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Hien Nguyen" <thuchien@xxxxxxxxx> wrote in message
news:567F1B33-D6AB-4ADC-A5E4-B0C1557F3FC7@xxxxxxxxxxxxxxxx
> It's hard for me. Because every time, when I break the debug to enter some
> command, I can't continue debug, every commands have no effect, the target
> computer is hung. Do I have some wrong config?
>
> And this problem, I solved it. But new problem appears now, at the latter
> post as below:
>
> int ModPower(bas,mod,pow,res)
> {
> unsigned short in i,a,b;
> ...[snip] //Just init variables here
>
> for (i=a,i>=b;i++)
> {
> DbgPrint("i=%d\n",i);
> ...[snip] // Do something here but don't change i
> }
>
> and then, when I see the debug in windbg:
> At the first loop , it's correct:
> i=31
> But at the second loop, I hope it is i=30, the result is
> i=22583
>
> always this number. I considered my code carefully, but still don't
> understand.
> Could you help me, show me why it happens?
>
>
> "Alireza Dabagh [MS]" wrote:
>
>> Please post the output of kb and !analyze -v
>>
>> -ali
>>
>> --
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "Hien Nguyen" <thuchien@xxxxxxxxx> wrote in message
>> news:F9DCA91A-CF03-413F-942F-1BF8556E929E@xxxxxxxxxxxxxxxx
>> >
>> > Thank you very very much for your support, I had try to change the code
>> > and
>> > data to make it smaller, and the driver work more a bit. But now I meet
>> > the
>> > following bug:
>> >
>> > *** Fatal System Error: 0x000000d1
>> > (0x1675B35C,0x00000002,0x00000000,0xF6ED231A)
>> > Break instruction exception - code 80000003 (first chance)
>> > A fatal system error has occurred.
>> > Debugger entered on first try; Bugcheck callbacks have not been
>> > invoked.
>> > A fatal system error has occurred.
>> >
>> > What is wrong here? And again, how to solve it?
>> > Thank you a lot.
>>
>>
>>


.



Relevant Pages

  • Re: Encrypt/ Decrypt in NdisIM with Ethernet
    ... > That again could be because stack gets corrupted. ... > write to an array or initialize a data structure? ... when I break the debug to enter some ... functions, in these, they use array as well. ...
    (microsoft.public.development.device.drivers)
  • Controlled types and exception safety
    ... I can classify the stack's operations by assigning them any of the above four levels, so that I know what can be expected when an exception is thrown for any reason (like inability to allocate more memory, or alike). ... For example, if the Push method of the stack gives me the strong guarantee, then I *know* that by calling this method either the new element will be appended to the stack, or the stack will remain unchanged, so that even if the exception is thrown, I don't have to worry about the stack's internal consistency. ... Since stack can be a dynamic data structure, assigning one stack object to another may involve destroying one existing data structure *and* creating a new one in its place. ...
    (comp.lang.ada)
  • Re: using MISC (post 1987 Forth hardware) opcodes
    ... still need to travel onto a stack every time you branch within the tree. ... Or without altering the data structure and using a threaded tree. ... restricted environment is also easier to program. ...
    (comp.lang.forth)
  • Re: Looking for free memory pool software
    ... >> careful to say "a data structure that a programmer would ... >> recognize as isomorphic to a stack." ... M> some of us has been trained in linguistics and know these ...
    (comp.lang.c)
  • Re: using MISC (post 1987 Forth hardware) opcodes
    ... You have a reason to trace though a deep ... Here's part of the data structure. ... Push and process. ... So put a stack in memory. ...
    (comp.lang.forth)