Stop reporting zero exit code when run JIT-ed code

This commit is contained in:
Dmitry Stogov 2023-11-16 13:57:37 +03:00
parent 5e9d41f6b4
commit d5596d815e
18 changed files with 3 additions and 35 deletions

View File

@ -965,7 +965,9 @@ finish:
int (*func)(void) = loader.main;
int ret = func();
fflush(stdout);
fprintf(stderr, "\nexit code = %d\n", ret);
if (ret) {
fprintf(stderr, "\nexit code = %d\n", ret);
}
}
return 0;

View File

@ -126,5 +126,3 @@ main:
2584
4181
6765
exit code = 0

View File

@ -151,5 +151,3 @@ main:
4181
6765
6765
exit code = 0

View File

@ -112,5 +112,3 @@ main:
2584
4181
6765
exit code = 0

View File

@ -126,5 +126,3 @@ main:
2584
4181
6765
exit code = 0

View File

@ -148,5 +148,3 @@ main:
4181
6765
6765
exit code = 0

View File

@ -111,5 +111,3 @@ main:
2584
4181
6765
exit code = 0

View File

@ -123,5 +123,3 @@ main:
2584
4181
6765
exit code = 0

View File

@ -147,5 +147,3 @@ main:
4181
6765
6765
exit code = 0

View File

@ -109,5 +109,3 @@ main:
2584
4181
6765
exit code = 0

View File

@ -126,5 +126,3 @@ main:
2584
4181
6765
exit code = 0

View File

@ -150,5 +150,3 @@ main:
4181
6765
6765
exit code = 0

View File

@ -113,5 +113,3 @@ main:
2584
4181
6765
exit code = 0

View File

@ -49,5 +49,3 @@ FibI
100
100
100
exit code = 0

View File

@ -877,5 +877,3 @@ lt: 01110_00110_00010_00000_00000
ult: 01111_00111_00011_00001_11111
le: 11110_01110_00110_00010_00000
ule: 11111_01111_00111_00011_11111
exit code = 0

View File

@ -901,5 +901,3 @@ lt: 02220_00220_00020_00000_00000
ult: 02222_00222_00022_00002_22222
le: 22220_02220_00220_00020_00000
ule: 22222_02222_00222_00022_22222
exit code = 0

View File

@ -3109,5 +3109,3 @@ lt: 03330_00330_00030_00000_00000
ult: 03333_00333_00033_00003_33333
le: 33330_03330_00330_00030_00000
ule: 33333_03333_00333_00033_33333
exit code = 0

View File

@ -3109,5 +3109,3 @@ lt: 30003_33003_33303_33333_33333
ult: 30000_33000_33300_33330_00000
le: 00003_30003_33003_33303_33333
ule: 00000_30000_33000_33300_00000
exit code = 0