Update to go1.23.4

This commit is contained in:
Vorapol Rinsatitnon
2024-12-24 19:40:24 +07:00
parent 289b9e3aad
commit f9b11597fa
32 changed files with 771 additions and 248 deletions

View File

@@ -6,19 +6,27 @@
void use(int *x) { (*x)++; }
void callGoFWithDeepStack() {
void callGoFWithDeepStack(int p) {
int x[10000];
use(&x[0]);
use(&x[9999]);
GoF();
GoF(p);
use(&x[0]);
use(&x[9999]);
}
int main() {
GoF(); // call GoF without using much stack
callGoFWithDeepStack(); // call GoF with a deep stack
void callGoWithVariousStack(int p) {
GoF(0); // call GoF without using much stack
callGoFWithDeepStack(p); // call GoF with a deep stack
GoF(0); // again on a shallow stack
}
int main() {
callGoWithVariousStack(0);
callGoWithVariousStackAndGoFrame(0); // normal execution
callGoWithVariousStackAndGoFrame(1); // panic and recover
}