Skip to content

当程序的freopen非法时,LemonLime将整体崩溃 #176

Description

@Cyril-44
  • 描述一下这个 Bug

如题,当有同学写成freopen("*.out","r",stdout)或不加freopen时,LemonLime会崩溃

  • 如何复现

重现 Bug 的步骤:

  1. 新建magic题目(文件读写)
  2. 新建cpp文件并在在程序里写:
#include <stdio.h>
int main() {
  freopen("magic.in", "r", stdin);
  freopen("magic.out", "r", stdout);
  return 0;
}

或者

int main() {
  return 0;
}
  1. 复制到source/example文件夹
  2. 测试全部
  3. 崩溃啦~
  • 期望获得的结果

FileIO Error 文件读写错误 / Runtime Error 运行时错误

  • 环境:

版本代号: 0.3.4:223
系统: Windows 11 22H2 (内部版本 22621.382)

  • 其他信息
虽然那些学生讲了多少遍都不听,但是我总不能一个一个查吧。。。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    整叉劈了 | Bug有一些不该发生的东西发生了

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions