compiler icon indicating copy to clipboard operation
compiler copied to clipboard

Different results on each compilation

Open Misiur opened this issue 5 years ago • 3 comments

Compiler 3.10.10, MRE in a few seconds. Compiling:

#include <a_samp>

main() {
  print("Hey wait");
  printf("Hello %s", "World");
}

No changes to code made:

root@7b250f68e776:/app# ./build.sh 
Pawn compiler 3.10.10                   Copyright (c) 1997-2006, ITB CompuPhase

Header size:            176 bytes
Code size:              116 bytes
Data size:              100 bytes
Stack/heap size:      16384 bytes; estimated max. usage=11 cells (44 bytes)
Total requirements:   16776 bytes

Done.
root@7b250f68e776:/app# ./build.sh 
Pawn compiler 3.10.10                   Copyright (c) 1997-2006, ITB CompuPhase

/app/dependencies/pawn-stdlib/default.inc(2) : fatal error 100: cannot read from file: "console"

Compilation aborted.


1 Error.
root@7b250f68e776:/app# ./build.sh 
Pawn compiler 3.10.10                   Copyright (c) 1997-2006, ITB CompuPhase

Header size:            176 bytes
Code size:              116 bytes
Data size:              100 bytes
Stack/heap size:      16384 bytes; estimated max. usage=11 cells (44 bytes)
Total requirements:   16776 bytes

Done.
root@7b250f68e776:/app# 

Misiur avatar Apr 02 '20 21:04 Misiur

Full MRE: https://github.com/Misiur/CompilerBug

Misiur avatar Apr 02 '20 22:04 Misiur

This strongly hints at undefined behaviour. I think we should add a static analyzer and sanitizer to the CI.

YashasSamaga avatar May 31 '20 14:05 YashasSamaga

This issue has been automatically marked as stale because it has not had recent activity.

stale[bot] avatar Aug 29 '20 15:08 stale[bot]