(no subject)

Date: 2025-03-28 01:17 pm (UTC)
simont: A picture of me in 2016 (0)
From: [personal profile] simont
C nowadays is an insanely hostile programming environment. A C compiler relentlessly scours your program for any place where may have violated C’s almost incomprehensible rules, so that it can compile your apparently-correct program into a buggy executable.

Yesterday I had a C compiler optimise my main() into literally zero instructions. Not even a return instruction. It silently output an object file which would cause execution to fall off the bottom of main() into whatever the linker had happened to put next in the image!

The sin: a float-to-uint32 conversion with input value exactly 232, i.e. only just an overflow.

This was grounds to emit an executable that could not possibly be what anybody ever wanted. But not grounds to print so much as a compiler warning, even at -Wall!
(will be screened)
(will be screened if not on Access List)
(will be screened if not on Access List)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

diziet: (Default)
Ian Jackson

May 2025

S M T W T F S
     123
45678910
11121314151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags