Question

Execution error NT Status Code 0xC000001d

Asked by: cpc2004

I am debugging two piece of code which fails with NT status code 0xc000001d (ILLEGAL_INSTRUCTION). They are valid instruction and I have no idea why. Is it possible that it is hardware problem at the CPU or motherboard?

Case 1
eax=00000159 ebx=00000000 ecx=00000000 edx=00000564 esi=e1a3e000 edi=8569ad98
eip=8057021f esp=efcc6b2c ebp=efcc6b30 iopl=0         nv up ei pl zr na po nc
cs=0008  ss=0010  ds=0023  es=0023  fs=0030  gs=0000             efl=00010246

8057021f    8bc8             mov     ecx,eax

Case 2
eax=f31bbc58 ebx=85f5a7b0 ecx=85f5a7e4 edx=00000000 esi=85eeb990 edi=f31bbc38
eip=8057ea5f esp=f31bba2c ebp=f31bbb04 iopl=0         nv up ei pl zr na po nc
cs=0008  ss=0010  ds=0023  es=0023  fs=0030  gs=0000             efl=00010246

8057ea5f   8a4f48           mov     cl,[edi+0x48]           ds:0023:f31bbc80=00

Any comment is appreciated

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2005-01-22 at 07:19:27ID21284425
Tags

0xc000001d

Topic

Assembly Programming Language

Participating Experts
4
Points
500
Comments
18

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. mov array[eax * 4], 0  /* when does multiply happ…
    I know this is not a C question, but maybe some assembly guys look at this section. In the assembly statement: mov dword ptr array[eax * 4], 0 When does the eax register get multiplied by four? Is the resulting index stored anywhere before it is added to "array"...
  2. Assembler > how to right use ASM and MOV in c++
    Forexample about joystick in my c++ program (Borland C++ Builder 3) I wrote long AAA,BBB; asm { mov ax,84h "or somethink like this" . . int 15h mov AAA,ax "and that is my problem" mov BBB,bx "and that is my problem"...
  3. Getting eax,edx into char[4]
    I am using Micro-C (http://www.dunfield.com) and need to access the pentium's cpu timestampusing opcode 0x0f31. I can't use the datatype "long" as that is not supported by Micro-C. I need to get the 32bit contents of the two registers eax and edx into two char[4] ar...
  4. Getting BSOD with new motherboard
    I have the following PC and recently got a new motherboard and ram, I am now getting BSOD occasionally when the PC is left on and also when switching the PC on. I have included my PC spec and some minidumps. Any help would be very much appreciated. Athlon 1.2 512Mb PC2700 So...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: dimitryPosted on 2005-01-22 at 11:23:10ID: 13111750

It seems like some H/W problem or you are "seeing" previous command and not the one that gives you exception.
The funny thing is that in google search this error mostly corresponds to WarCraft III.
http://www.vitaerising.com/modules.php?op=modload&name=PNphpBB2&file=viewtopic&p=3676

 

by: cpc2004Posted on 2005-01-22 at 15:44:15ID: 13112893

Hi dimitry,
Thanks for your reply. From the value of EIP, I don't think I see the previous command. I search google about the explanation of of 0xc00001d and it only mention that the instructiion is invalid and no detail explanation and example.

cpc2004

 

by: aib_42Posted on 2005-01-22 at 22:11:31ID: 13114056

Are you sure EIP points to the faulty instruction? It may point to the next one...

If you're only getting this error with the programs you are debugging, chances are that it's not a hardware fault.

Also see:
http:Q_21278375.html

 

by: cpc2004Posted on 2005-01-22 at 22:53:38ID: 13114125

The failing instruction address is within windows kernel ntoskrnl.exe.

 

by: dimitryPosted on 2005-01-23 at 10:35:39ID: 13116163

Can you please show bigger hex dump before and after fault ?

 

by: BeyondWuPosted on 2005-01-25 at 06:46:01ID: 13132362

It's interesting, I can't believe that "mov  ecx,eax" throws the ILLEGAL_INSTRUCTION exception, please change this line "mov  ecx,eax" to any other opcode, maybe it still will crash... if so, that means this exception is caused by other opcode.

 

by: aib_42Posted on 2005-01-25 at 06:51:42ID: 13132431

Can you also show us a snippet of the code you're debugging? Perhaps around where it crashes?

 

by: cpc2004Posted on 2005-01-25 at 08:32:13ID: 13133608

Thanks for the reply from dimitry, aib 42 and BeyondWu,

BugCheck 1000008E, {c000001d, 8057021f, efcc6ab8, 0}

1: kd> r
eax=00000159 ebx=00000000 ecx=00000000 edx=00000564 esi=e1a3e000 edi=8569ad98
eip=8057021f esp=efcc6b2c ebp=efcc6b30 iopl=0         nv up ei pl zr na po nc
cs=0008  ss=0010  ds=0023  es=0023  fs=0030  gs=0000             efl=00010246
nt+0x9921f:8057021f 8bc8             mov     ecx,eax

1: kd> u 80570210 l9
nt+0x99210:
80570210 0f84e1f8ffff     je      nt+0x98af7 (8056faf7)
80570216 c60001           mov     byte ptr [eax],0x1
80570219 e9d9f8ffff       jmp     nt+0x98af7 (8056faf7)
8057021e 49               dec     ecx
8057021f 8bc8             mov     ecx,eax                 <----
80570221 0f85481f0a00     jne     nt+0x13b16f (8061216f)
80570227 c1e909           shr     ecx,0x9
8057022a 8b0c8e           mov     ecx,[esi+ecx*4]
8057022d 25ff010000       and     eax,0x1ff

 

by: cpc2004Posted on 2005-01-25 at 08:50:57ID: 13133835

Here is another example, I wouldn't figure out it fails with c00001d unless it is a hardware error.

BugCheck 1000008E, {c000001d, bf80d95f, f3b9bba0, 0}

STACK_TEXT:  
WARNING: Stack unwind information not available. Following frames may be wrong.
f3b9bd54 804ddee0 0000000d 0012f50c 0012f548 win32k+0xd95f
f3b9bd64 7c90eb94 badb0d00 0012f50c 00000000 nt+0x6ee0      
0012f548 00000000 00000000 00000000 00000000 0x7c90eb94

TRAP_FRAME:  f3b9bba0 -- (.trap fffffffff3b9bba0)
ErrCode = 00000000
eax=01210cb0 ebx=7ffdf1dc ecx=0000ffff edx=0000ffff esi=00000000 edi=00000000
eip=bf80d95f esp=f3b9bc14 ebp=f3b9bd54 iopl=0         nv up ei pl nz na pe nc
cs=0008  ss=0010  ds=0023  es=0023  fs=0030  gs=0000             efl=00010202
win32k+0xd95f:
bf80d95f 8b8d68ffffff     mov     ecx,[ebp-0x98]    ss:0010:f3b9bcbc=019000

FAILED_INSTRUCTION_ADDRESS:
win32k+d95f bf80d95f 8b8d68ffffff     mov     ecx,[ebp-0x98]

0: kd> u bf80d94f l20
win32k+0xd94f:
bf80d94f 0000             add     [eax],al
bf80d951 85c0             test    eax,eax
bf80d953 0f85e1fbffff     jne     win32k+0xd53a (bf80d53a)
bf80d959 8b45e4           mov     eax,[ebp-0x1c]
bf80d95c 8b402c           mov     eax,[eax+0x2c]
bf80d95f 8b8d68ffffff     mov     ecx,[ebp-0x98]        ?????
bf80d965 394808           cmp     [eax+0x8],ecx
bf80d968 0f8534feffff     jne     win32k+0xd7a2 (bf80d7a2)
bf80d96e 8b45e4           mov     eax,[ebp-0x1c]
bf80d971 8b402c           mov     eax,[eax+0x2c]
bf80d974 8b4dac           mov     ecx,[ebp-0x54]
bf80d977 3b4820           cmp     ecx,[eax+0x20]
bf80d97a 0f858dfcffff     jne     win32k+0xd60d (bf80d60d)
bf80d980 8b45e4           mov     eax,[ebp-0x1c]
bf80d983 f6403c01         test    byte ptr [eax+0x3c],0x1
bf80d987 0f85a1fcffff     jne     win32k+0xd62e (bf80d62e)
bf80d98d 8b45e4           mov     eax,[ebp-0x1c]
bf80d990 8b482c           mov     ecx,[eax+0x2c]
bf80d993 8d8184010000     lea     eax,[ecx+0x184]
bf80d999 3b30             cmp     esi,[eax]
bf80d99b 0f85c8fcffff     jne     win32k+0xd669 (bf80d669)
bf80d9a1 8b55c4           mov     edx,[ebp-0x3c]
bf80d9a4 3b9188010000     cmp     edx,[ecx+0x188]
bf80d9aa 0f85b6fcffff     jne     win32k+0xd666 (bf80d666)
bf80d9b0 ff4dd8           dec     dword ptr [ebp-0x28]
bf80d9b3 8b45c8           mov     eax,[ebp-0x38]
bf80d9b6 83c003           add     eax,0x3
bf80d9b9 83e0fc           and     eax,0xfffffffc
bf80d9bc 03d8             add     ebx,eax
bf80d9be 895de0           mov     [ebp-0x20],ebx
bf80d9c1 837dd800         cmp     dword ptr [ebp-0x28],0x0
bf80d9c5 763c             jbe     win32k+0xda03 (bf80da03)

 

by: cpc2004Posted on 2005-01-29 at 05:28:41ID: 13171383

1 more new occurence and this time the failing instruction is ffff. The failing instruction address bf80d946 belongs to microsoft win32k.sys. Do you think it is a software error of win32k.sys or it is caused by an invalid branch to bf80d946? I searched google and I would not find any related hit.

BugCheck 1000008E, {c000001d, bf80d946, f2618770, 0}

eax=e49119c8 ebx=7ffd81dc ecx=f261889c edx=0000005c esi=00000000 edi=00000332
eip=bf80d946 esp=f26187e4 ebp=f2618924 iopl=0         nv up ei pl zr na po nc
cs=0008  ss=0010  ds=0023  es=0023  fs=0030  gs=0000             efl=00010246
win32k+0xd946:
bf80d946 ffff             ???

0: kd> u win32k+d93f l9
win32k+0xd93f:
bf80d93f 40               inc     eax
bf80d940 18600f           sbb     [eax+0xf],ah
bf80d943 85de             test    esi,ebx
bf80d945 fb               sti
bf80d946 ffff             ???   <---- this is not a valid intel assembler instruction
bf80d948 8b45e4           mov     eax,[ebp-0x1c]
bf80d94b 8b80dc010000     mov     eax,[eax+0x1dc]
bf80d951 85c0             test    eax,eax
bf80d953 0f85e1fbffff     jne     win32k+0xd53a (bf80d53a)

 

by: cpc2004Posted on 2005-01-29 at 07:26:46ID: 13171816

I find out the reason and it is a one bit overlay at location at bf80d93e hence windows crashes with op code. Is it possible that it is one byte overlaid by a faulty program or is is a hardware error?

Correct code
bf80d93e f6401860         test    byte ptr [eax+0x18],0x60
         ^^
bf80d942 0f85defbffff     jne     win32k!NtGdiFlushUserBatch+0x642 (bf80d526)

Corrupt code
bf80d93e e640             out     40,al
         ^^
bf80d940 18600f           sbb     [eax+0xf],ah
bf80d943 85de             test    esi,ebx
bf80d945 fb               sti
bf80d946 ffff             ???  <--- failed with invalid op code

 

by: aib_42Posted on 2005-01-29 at 13:46:12ID: 13173319

This is Windows, anything is possible :).

What debugger are you using? If it is SoftIce, you could watch that memory location for write operations, and then figure out what piece of code is doing that.

If you're suspecting your RAM chips (I wouldn't suspect any other hardware), try MemTest86, a boot-up memory tester that will do several tests on your RAMs. - http://www.memtest86.com/

 

by: BeyondWuPosted on 2005-01-30 at 05:45:07ID: 13175695

It seems you are debugging a kernel mode driver/module with WinDbg, I don't believe it's a hardware fault. It seems caused by some code modification or buffer overflow....
You can use BPM bf80d93e within SoftICE or "break at location if memory changes" to check when the 0xf640 is modified to 0xe640.... I guess this is maybe caused by your code.

 

by: cpc2004Posted on 2005-01-30 at 06:20:40ID: 13175852

Thanks for comment from BeyondWu and aib 42.

Someone got the crash and pass the minidump to me. I use windbg to do the post morten analysis. How can I confirn the code corruption is caused by coding error or hardware error?

cpc2004

 

by: aib_42Posted on 2005-01-30 at 17:00:06ID: 13179080

It's either one or the other, so test for either one. I would go with BeyondWu's last suggestion, "break at location if memory changes..."

 

by: cpc2004Posted on 2005-01-30 at 17:15:23ID: 13179148

It is a post moterm analysis dump analysis and it crashes at another Windows thousands miles away. Also I don't know how to recreate the problem at their windows.

 

by: BeyondWuPosted on 2005-01-30 at 18:40:10ID: 13179524

You may could check the following list:
1. Does this modem analysis work properly at other windows box?
   If so, this issue maybe caused by hardware or hardware conflict or platform difference.
   a. Please make sure your analysis module works on the same windows version(include SP version) as your development machine.
   b. Try to reinstall the machine if possible
   c. Try to remove all un-necessary card from the motherboard(to test the hardware conflict).
2. Is there any hardware card comes with this modem analysis module?
   If so, please try to change another new Card.
3. Tell your colleague to debug it more detailed, put the break point on memroy changes to catch which module changed the Win32k.sys.

 

by: PaulCaswellPosted on 2005-02-16 at 07:29:45ID: 13324914

I had a problem like this a few years ago. I.E. Invalid opcode at an address that is DEFINITELY valid.

The upshot was that it was actually an ISR address that was faulty. When the interrupt hit, the address was trash so the system tried to vector to a random location. Unfortunately, at that location was an invalid opcode so another interrupt was thrown to report the invalid opcode. Sadly, it then failed to track to the true address, it tracked back to the original address that was executing when the FIRST interrupt happened.

In summary, check that no ISR is in moveable memory etc etc.

Paul

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...