请教 : fatal error C1001: INTERNAL COMPILER ERROR

lingzantia 2005-05-11 10:53:42
我用VC6.0编译文件,提示fatal error C1001: INTERNAL COMPILER ERROR错误,该怎么解决?
...全文
2096 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
lingzantia 2005-05-11
  • 打赏
  • 举报
回复
下面是我的代码,分为3个.cpp和2个.h文件:

//main.cpp
#include <iostream>
using namespace std;

#include "test.h"
#include "three_d.h"

void main(void)
{
test menu;
}



//three_d.h
#ifndef THREE_D_H
#define THREE_D_H

class three_d
{
private:
int x, y, z;
void init();
public:
three_d();
three_d(int a,int b,int c);
~three_d();
friend three_d operator+(const three_d &obj_1, const three_d &obj_2);
friend three_d operator--(three_d &obj, int);
friend ostream &operator<<(ostream &out, const three_d &obj);
friend istream &operator>>(istream &in, three_d &obj);.
three_d operator++();
three_d operator-=(const three_d &obj);
};

#endif


//three_d.cpp
#include <iostream>
using namespace std;
#include "three_d.h"

void three_d::init()
{
cout << "Input the three_d : ";
cin >> x >> y >> z;
}

three_d::three_d()
{
init();
}

three_d::three_d(int a,int b,int c) : x(a), y(b), z(c)
{}

three_d::~three_d(){}

three_d three_d::operator ++()
{
++x;
++y;
++z;
return *this;
}

three_d three_d::operator -=(const three_d &obj)
{
x -= obj.x;
y -= obj.y;
z -= obj.z;
return *this;
}

three_d operator+(const three_d &obj_1, const three_d &obj_2)
{
return three_d(obj_1.x + obj_2.x, obj_1.y + obj_2.y, obj_1.z + obj_2.z);
}

three_d operator--(three_d &obj, int)
{
x--;
y--;
z--;
return *this;
}

ostream &operator<<(ostream &out, const three_d &obj)
{
out << "The three_d is : ";
out << odj.x;
out << ", ";
out << obj.y;
out << ", ";
out << obj.z;
out << endl;

return out;
}

istream &operator>>(istream &in, three_d &obj)
{
in >> obj.x;
in >> obj.y;
in >> obj.z;

return in;
}


//test.h
#ifndef TEST_H
#define TEST_H

class test
{
public:
test();
~test();
void menu();
};

#endif


//test.cpp
#include <iostream>
using namespace std;
#include "test.h"
#include "three_d.h"

test::test(){}

test::~test(){}

void test::menu()
{
char ch;

cout << "选项\n";
cout << "================================================\n";
cout << "1、两对象求和 2、对象对自身求差\n";
cout << "3、前自增 4、后自减\n";
cout << "5、退出\n";
cout << "================================================\n\n";

cout << "选择 : ";
cin >> ch;

do
{
switch(ch)
{
case '1' : three_d obj_1, obj_2;
cout << obj_1 + obj_2 << endl;
break;
case '2' : three_d obj_1, obj_2;
cout << obj_1 -= obj_2 << endl;
break;
case '3' : three_d obj;
cout << ++obj << endl;
break;
case '4' : three_d obj;
cout << obj-- << endl;
break;
case '5' : return;
default : cout << "错误的选择!\n";
}

cout << "继续操作?[是(Y or y) / 不(any other key)]";
cin >> ch;
}while ( (ch == 'Y') || (ch == 'y') );
}
lingzantia 2005-05-11
  • 打赏
  • 举报
回复
大家帮帮忙!
lingzantia 2005-05-11
  • 打赏
  • 举报
回复
晕,我也用MSDN,可是英文太菜了,麻烦翻译一下,好不?
277894613 2005-05-11
  • 打赏
  • 举报
回复
Fatal Error C1001
INTERNAL COMPILER ERROR
(compiler file 'file', line number)

This error is most often generated in one of two cases:

Failure to recover the compiler's internal state following detection of a syntax error in the program. The first pass of the compiler will occasionally fail when attempting to recover its state following the detection of a malformed program. Typically, the compiler will have printed an error message (or messages) and will later produce an internal compiler error. In most cases, fixing the errors reported in your code and recompiling will solve the problem.


Failure of the code generator to find a way to generate correct code for a construct. This is most often caused by the interaction of an expression and an optimization option. The optimization has generated a tree which the compiler does not know how to handle. Such a problem can often be fixed by removing one or more optimization options when compiling the particular function containing the line indicated in the error message.
If no error messages have been emitted prior to the internal compiler error, then the next step is to determine which pass of the compiler is emitting the internal compiler error. This can be determined by recompiling the application with the /Bd option included. The /Bd option will cause each pass to print its name and arguments when it is invoked. The last pass invoked before the error is emitted is the one responsible.

If the pass indicated is P1, then the likely problem is still error recovery, as in number one above, but it is happening before the compiler has had a chance to emit the error message for the error it has just discovered. In such a case, examine the line on which the internal compiler error is reported. This line may also contain an unreported syntax error. Fixing any errors you find on that line will solve the internal compiler error in most cases. If you cannot find any error on that line or on the line previous to the one reported, contact Microsoft Product Support Services for help.

If the pass indicated is P2, then the problem can usually be fixed by removing one or more optimization options (or using a different code generator). You can determine which option is at fault by removing them one at a time and recompiling until the message goes away. Generally the last one removed is the problem and all other optimizations can be used safely. The most common culprits are /Og, /Oi, and /Oa. Once the offending optimization is discovered, it need not be turned off for the entire compilation. The offending optimization can be disabled with the optimize pragma while compiling the function where the error occurred, but enabled for the rest of the module.

More rarely, such errors occur at very low optimization levels or even when optimization is disabled. In such cases, rewriting the line where the error is reported (or possibly several lines including the one causing the error) may be a solution. If none of these options works, consult the technical support help file or the technical support section in one of your manuals.
=====================================================================================
我遇到过,一直没有解决,竟然放弃了,遗憾
内容概要:本文详细记录了对一个Android ARM64静态ELF文件中字符串加密机制的逆向分析过程。该ELF文件的所有字符串均被加密,无法通过常规strings命令或IDA直接识别。作者通过分析发现,加密字符串存储在.rodata段,其解密所需信息(包括密文地址、长度和16位密钥)保存在.data.rel.ro段的40字节描述符中。核心解密函数sub_10F408采用自反的双pass流密码算法,结合固定密钥KEY_TERM(由.data段24字节数据计算得出),实现字节级非线性、位置与长度相关的加密。文章还复现了完整的Python解密脚本,并揭示了该保护机制的本质为代码混淆而非强加密,最终成功批量解密全部956条字符串,暴露程序真实行为,如shell命令模板、设备标识篡改、网络重置等操作。此外,文中还提及未启用的自定义壳框架及其反dump设计。; 适合人群:具备逆向工程基础的安全研究人员、二进制分析人员及对ELF保护技术感兴趣的开发者。; 使用场景及目标:①学习ELF二进制中字符串加密的典型实现方式与逆向突破口;②掌握从结构识别、函数追踪到算法还原的完整逆向流程;③理解“绑定二进制”的完整性校验设计及其局限性;④实践编写IDAPython脚本自动化提取与解密敏感数据。; 阅读建议:此资源以实战案例驱动,不仅展示技术细节,更强调逆向思维与验证方法,建议读者结合IDA调试环境,逐步跟随文中步骤进行动态分析与算法验证,深入理解每一步的推理依据。

24,851

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 工具平台和程序库
社区管理员
  • 工具平台和程序库社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧