Solved

"Illegal Instruction" executed

Posted on 1997-06-19
4
349 Views
Last Modified: 2011-10-03
Instead of running, my C program stops with the message "This program has performed an illegal instruction and will be terminated.  Quit all programs, and then restart your computer."  I tried restarting, and it didn't help.
What should I do?
0
Comment
Question by:Mark Ebden
4 Comments
 
LVL 5

Expert Comment

by:yonat
Comment Utility
You are probably using a dangling pointer somewhere. If you post
the misbehaving code so, I'll try to find it.
0
 
LVL 4

Expert Comment

by:AVaulin
Comment Utility
Waiting for more details and/or code...
0
 

Accepted Solution

by:
rrandy earned 50 total points
Comment Utility
You need to get more information.

- If your compiler has a debug mode, run the code one line at a
time and see which line break the program.  Once you have the line guessed, fixing it should be trivial (you hope).

- If not, plave MANY printf()'s in your code.  The section of code between the last printf shown and the first printf not shown will tell you which code section you need to check.  
0
 

Author Comment

by:Mark Ebden
Comment Utility
Thanks; I was going to try that as a last resort.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now