I don't think there is anything that gives you this guarantee. (Happy to admit I'm wrong if shown relevant spec language.) I think if you run on a HW that is physically capable of ending the universe (including all threads and programs running within :) then UB can trigger that.
-
This Tweet is unavailable.
-
This Tweet is unavailable.
-
-
This Tweet is unavailable.
-
This Tweet is unavailable.
-
This Tweet is unavailable.
-
Replying to @rrika9
It probably would not "make sense", but that's different from if UB allows it. Ad virtual address space: I don't think there's anything that prevents UB from executing system calls, including things like kill().
0 replies 0 retweets 1 like -
This Tweet is unavailable.
-
This Tweet is unavailable.
-
Replying to @rrika9
As I understand it a compiler can assume that a codepath leading to UB is never executed. No further limitations. Therefore, in the compiler output, such a codepath may execute any arbitrary code.
1 reply 0 retweets 1 like
Or in other words: The C++ spec only specifies the behavior of the program for program inputs that never hit UB.
9:08 AM - 17 Jan 2019
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.