Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #270429

[OFFTOPIC] Re: About dash as sh

From Stefan Monnier <monnier@iro.umontreal.ca>
Newsgroups linux.debian.user
Subject [OFFTOPIC] Re: About dash as sh
Date 2024-06-24 15:00 +0200
Message-ID <ISRsB-5dSQ-7@gated-at.bofh.it> (permalink)
References (2 earlier) <IRKCR-4uPg-1@gated-at.bofh.it> <IRKWe-4uW5-9@gated-at.bofh.it> <IRVRD-4BXS-1@gated-at.bofh.it> <ISLdv-59LY-1@gated-at.bofh.it> <ISLwR-59Sy-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> Do shells suffer UB? I always thought that was a C thing.

UB is a standard concept when defining programming languages.
Most if not all programming languages have some form of UB or another in
some part of the spec.  C is special w.r.t to UB in two ways:

- UB is not relegated to corner cases that virtually never happen (like
  the UB recommended by Jeffrey for sh), as is usually the case.
  Instead almost all programs in actual use rely on UB during their
  normal execution and in many cases it's somewhere between hard and
  impossible to avoid.
- Modern C compilers like to optimize code based on the assumption that
  UB never happens.

The combination of the two makes it particularly entertaining.


        Stefan

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

About dash as sh Ilya Kazakevich <ilya.kazakevich@jetbrains.com> - 2024-06-21 00:30 +0200
  Re: About dash as sh Mike Castle <dalgoda+debian@gmail.com> - 2024-06-21 09:00 +0200
  Re: About dash as sh Michael Kjörling <2695bd53d63c@ewoof.net> - 2024-06-21 12:20 +0200
    Re: About dash as sh Greg Wooledge <greg@wooledge.org> - 2024-06-21 13:30 +0200
      Re: About dash as sh Nicolas George <george@nsup.org> - 2024-06-21 13:50 +0200
        Re: About dash as sh Greg Wooledge <greg@wooledge.org> - 2024-06-21 14:00 +0200
          Re: About dash as sh Mike Castle <dalgoda+debian@gmail.com> - 2024-06-21 18:50 +0200
            Re: About dash as sh Greg Wooledge <greg@wooledge.org> - 2024-06-21 19:20 +0200
        Re: About dash as sh Stefan Monnier <monnier@iro.umontreal.ca> - 2024-06-22 01:30 +0200
          Re: About dash as sh Nicolas George <george@nsup.org> - 2024-06-24 08:20 +0200
            Re: About dash as sh Jeffrey Walton <noloader@gmail.com> - 2024-06-24 08:40 +0200
              [OFFTOPIC] Re: About dash as sh Stefan Monnier <monnier@iro.umontreal.ca> - 2024-06-24 15:00 +0200
  Re: About dash as sh Ilya Kazakevich <ilya.kazakevich@jetbrains.com> - 2024-06-26 20:20 +0200
    Re: About dash as sh Max Nikulin <manikulin@gmail.com> - 2024-06-28 05:00 +0200

csiph-web