|
|
|
|
|
by throwaway31338
1669 days ago
|
|
Undefined behavior isn't a feature. A spec isn't an implementation, either. All behavior in an implementation can be teased-out if given sufficient time. > if you were an alien trying to reconstruct it, for example - you'd hit serious problems. I can't speak to alien minds. Considering the feats of reverse-engineering I've seen in the IT world (software security, semiconductor reverse-engineering) or cryptography (the breaking the Japanese Purple cipher in WWII, for example) I think it's safe to say humans are really, really good at reverse-engineering other human-created systems from close-to-nothing. Starting with documentation would be a step-up. |
|
You said:
> because programs can't work without being specified.
.. what I think you may have meant was "can't work without being implemented", because your subsequent comments are all about implementation.
> Undefined behavior isn't a feature
Yes it is, it's a feature of the C specification.
This is where a whole load of pain and insecurity comes from, because as you say the implementations must do something when encountering undefined behavior, and people learn what usually happens, then an improvement is made to the optimizer which changes the implementation.