Project-LemonLime / Project_LemonLime

为了 OI 比赛而生的基于 Lemon + LemonPlus 的轻量评测系统 | 三大桌面系统支持
GNU General Public License v3.0
565 stars 60 forks source link

[Feature] 关于 #169 #142 RE 问题的想法 #185

Closed accepted-zhs closed 1 year ago

accepted-zhs commented 1 year ago

Is your feature request related to a problem? Please describe. 你的功能请求是否与某些问题有关?请描述。

见 #169 #142。

Describe the solution you'd like 描述您想要的解决方案

size 可以获取二进制文件中数据段的大小。一般 Linux 自带 size 程序,Windows 用 GNU Binutils 也会有 size 程序,macOS 不清楚。

可不可以提前利用 size 的输出判断这个程序非动态分配的内存是否超限,避免一开始就报 RE?如果没有 size 程序,就不判断。

Additional context 补充内容

感觉改改 watcher_unix.cpp 就行...

tofucurd commented 1 year ago

size 可以获取二进制文件中数据段的大小。一般 Linux 自带 size 程序,Windows 用 GNU Binutils 也会有 size 程序,macOS 不清楚。

补充一下,macOS下也自带size