Lmao "feature" in Macos when compile C++ code

Revision en1, by HieuNekodesu, 2023-01-25 11:59:04

Watch this video first Video

#include<bits/stdc++.h>
#define ii pair <int,int>
#define fi first
#define se second
#define int long long
#define double long double
#define endl '\n'
using namespace std;

const int maxN = 5000;
// const int maxN = 1e5 + 10;

int dp[maxN][maxN];

signed main(){
    //freopen("input.INP", "r", stdin);
    //freopen("output.OUT", "w", stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    return 0;
}

I use Macos Monterey 12.6.2, Command Line Tools for Xcode 14, and Homebrew GCC 12.2.0. When I declare the array too large, the machine will automatically restart. My question is is this a bug or a feature, because when I try it on Window 11 it still shows an error, not a restart. And as far as I know, when we restart the computer with code, we need admin permission sudo shutdown -r now but if we use this way, we don't need it.

Tags j4f, macos

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English HieuNekodesu 2023-01-25 11:59:04 1046 Initial revision (published)