home.social

#undefinedbehaviour — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #undefinedbehaviour, aggregated by home.social.

  1. @chakie

    I personnally never count upon miracle segfaults to detect errors, as it is simply Undefined Behaviour #undefinedbehaviour in C/C++, so you cannot know what happens in such cases.

    But you are right, often you can get segfaults to indicate you early that a corruption is happening.

    It remains a powerful technique for optimizing speed. Often, one cannot gain on every level ;-)

    I was just talking about it. It is not a recommended way to do it.

    If your allocation is not in a bottleneck, it is a fuss you don't have to worry about.

  2. I rather got a chuckle out of this #LWN article, which can sort of be summarized as "CPU architectures involving time-travel result in undefined behaviour".

    lwn.net/Articles/993484/

    #TimeTravel #MemoryModel #C #programming #C++ #UndefinedBehaviour

  3. I rather got a chuckle out of this #LWN article, which can sort of be summarized as "CPU architectures involving time-travel result in undefined behaviour".

    lwn.net/Articles/993484/

    #TimeTravel #MemoryModel #C #programming #C++ #UndefinedBehaviour

  4. I rather got a chuckle out of this #LWN article, which can sort of be summarized as "CPU architectures involving time-travel result in undefined behaviour".

    lwn.net/Articles/993484/

    #TimeTravel #MemoryModel #C #programming #C++ #UndefinedBehaviour

  5. I rather got a chuckle out of this #LWN article, which can sort of be summarized as "CPU architectures involving time-travel result in undefined behaviour".

    lwn.net/Articles/993484/

    #TimeTravel #MemoryModel #C #programming #C++ #UndefinedBehaviour

  6. I rather got a chuckle out of this #LWN article, which can sort of be summarized as "CPU architectures involving time-travel result in undefined behaviour".

    lwn.net/Articles/993484/

    #TimeTravel #MemoryModel #C #programming #C++ #UndefinedBehaviour

  7. Falsehoods programmers believe about undefined behaviour, predr.ag/blog/falsehoods-progr.

    The article explains what is an undefined behaviour exactly. It’s funny.

  8. The basic problem with C is that the committee have been asleep at the wheel for 30 years. As soon as UB began to be interpreted as "the compiler will now do impossible things" they should have stepped in and said "actually we mean that _some value_ is produced, but we do not care to specify what" (or a trap is raised, to keep SGI on board). That covers arithmetic anyway.
    Sure for pointers and longjmp you do need "truly undefined", but even that could be profiled.

    1/

    #UndefinedBehaviour