4 ms·
> Does this include that a compiler, when it can prove that a program it compiles contains UB, erase your disk as part of the compilation process? i.e. without
by matkoniecz 4y ago
> Does this include that a compiler, when it can prove that a program it compiles contains UB, erase your disk as part of the compilation process? i.e. without you ever running the compiled program.
No, but technically compiler would not violate specification by compiling program that on running will scan your disk for secret data, publish it online, apply ransomware to your disk and deliberately destroy your SSD.
- dottedmag 4y agoAlso known as "nasal demons"
- bmacho 4y agoWhat about the C programs? I guess the program void main(){}; is allowed to row hammer your RAM and inspect and modify the states of other programs, but is it allowed e.g. to delete your file system through a system call?
- matkoniecz 4y agoIs it program with UB? If yes, then compiler can compile program doing literally anything* and be in compliance with standards as defined. *including hacking Pentagon to order drone strike on location where it was compiled. Or summoning demons. Or deleting your file system through a system call.
- deleted 4y ago[deleted]