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


Groups > comp.lang.c++ > #89160 > unrolled thread

Is this safe?

Started byMuttley@dastardlyhq.com
First post2023-02-20 16:45 +0000
Last post2023-02-21 08:15 -0800
Articles 20 on this page of 203 — 22 participants

Back to article view | Back to comp.lang.c++


Contents

  Is this safe? Muttley@dastardlyhq.com - 2023-02-20 16:45 +0000
    Re: Is this safe? Bonita Montero <Bonita.Montero@gmail.com> - 2023-02-20 18:34 +0100
      Re: Is this safe? Chris Vine <vine24683579@gmail.com> - 2023-02-20 11:16 -0800
        Re: Is this safe? Bonita Montero <Bonita.Montero@gmail.com> - 2023-02-20 21:39 +0100
          Re: Is this safe? Chris Vine <vine24683579@gmail.com> - 2023-02-20 12:56 -0800
            Re: Is this safe? Tony Oliver <guinness.tony@gmail.com> - 2023-02-20 16:17 -0800
              Re: Is this safe? Manu Raju <MR@invalid.invalid> - 2023-02-21 01:57 +0000
                Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-21 09:15 +0000
                  Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-21 12:31 +0200
            Re: Is this safe? Bonita Montero <Bonita.Montero@gmail.com> - 2023-02-21 05:36 +0100
              Re: Is this safe? Chris Vine <vine24683579@gmail.com> - 2023-02-21 02:19 -0800
                Re: Is this safe? Bonita Montero <Bonita.Montero@gmail.com> - 2023-02-21 14:16 +0100
                  Re: Is this safe? Ralf Goertz <me@myprovider.invalid> - 2023-02-21 14:40 +0100
                  Re: Is this safe? Chris Vine <vine24683579@gmail.com> - 2023-02-21 05:51 -0800
                  Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-21 15:58 +0200
                    Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-21 14:55 +0000
                      Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-21 19:02 +0200
                        Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-21 17:13 +0000
                          Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-21 19:58 +0200
                            Re: Is this safe? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-02-21 12:15 -0800
                              Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-21 23:41 +0200
                                Re: Is this safe? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-03-03 12:57 -0800
        Re: Is this safe? Tony Oliver <guinness.tony@gmail.com> - 2023-02-20 16:14 -0800
          Re: Is this safe? James Kuyper <jameskuyper@alumni.caltech.edu> - 2023-02-20 23:48 -0500
        Re: Is this safe? Öö Tiib <ootiib@hot.ee> - 2023-02-21 00:05 -0800
      Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-21 09:14 +0000
    Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-20 21:18 -0500
    Re: Is this safe? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-20 20:38 -0800
      Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-21 09:18 +0000
        Re: Is this safe? "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-02-21 15:12 +0100
          Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-21 14:53 +0000
            Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-21 10:35 -0800
              Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-22 09:25 +0000
                Re: Is this safe? "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-02-22 22:33 +0100
                  Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 09:25 +0000
                    Re: Is this safe? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-23 07:05 -0800
                Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-22 21:21 -0800
                Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-23 09:39 +0200
                  Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 09:35 +0000
                    Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-23 12:30 +0200
                      Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 10:34 +0000
                        Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-23 13:20 +0200
                          Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 16:00 +0000
                            Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-23 18:24 +0200
                              Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 16:28 +0000
                                Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-23 19:01 +0200
                              Re: Is this safe? James Kuyper <jameskuyper@alumni.caltech.edu> - 2023-02-23 11:57 -0500
                                Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-23 19:12 +0200
                          Re: Is this safe? James Kuyper <jameskuyper@alumni.caltech.edu> - 2023-02-23 11:57 -0500
                            Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-23 12:20 -0500
                              Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-02-24 02:15 +0000
                                Re: Is this safe? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-02-24 15:24 -0800
                              Re: Is this safe? James Kuyper <jameskuyper@alumni.caltech.edu> - 2023-02-24 02:14 -0500
                        Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-23 07:18 -0500
                          Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 16:01 +0000
                            Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-23 11:50 -0500
                              Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-23 14:41 -0800
                            Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-23 19:44 +0100
                        Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-23 15:02 +0100
                          Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-02-23 14:49 +0000
                            Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-23 16:25 +0100
                          Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 16:10 +0000
                            Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-23 20:46 +0100
                              Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-23 20:05 +0000
                                Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-23 14:48 -0800
                                  Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-23 22:12 -0500
                                  Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-24 10:49 +0200
                                Re: Is this safe? Ralf Fassel <ralfixx@gmx.de> - 2023-02-24 11:36 +0100
                                  Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-24 15:39 +0000
                              Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-24 10:29 +0000
                                Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-24 17:20 +0100
                                  Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-24 17:09 +0000
                                    Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-24 17:32 +0000
                                      Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-25 11:56 +0000
                                        Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-25 16:04 +0100
                                          Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-25 15:47 +0000
                                            Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-25 19:13 +0100
                                              Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-25 19:00 +0000
                                              Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-27 08:43 +0000
                                                Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-27 10:31 +0100
                                          Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-25 16:40 +0000
                                    Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-24 18:42 +0100
                                      Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-25 11:58 +0000
                                        Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-25 16:25 +0100
                                          Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-25 15:45 +0000
                                            Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-25 19:15 +0100
                                              Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-27 08:44 +0000
                                                Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-27 10:40 +0100
                                                  Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-27 10:24 +0000
                                                    Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-27 18:31 +0100
                                                      Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-28 08:38 +0000
                                                        Re: Is this safe? Öö Tiib <ootiib@hot.ee> - 2023-02-28 01:33 -0800
                                                          Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-28 10:17 +0000
                                                            Re: Is this safe? Öö Tiib <ootiib@hot.ee> - 2023-02-28 02:43 -0800
                                                              Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-28 16:50 +0100
                                                        Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-02-28 03:19 -0800
                                                          Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-28 08:10 -0500
                                                            Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-02-28 05:42 -0800
                                                              Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-28 09:39 -0500
                                                                Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-02-28 07:12 -0800
                                                                  Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-28 11:29 -0500
                                                              Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-28 16:45 +0100
                                                                Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-02-28 11:31 -0800
                                                                  Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-28 20:59 +0100
                                                              Re: Is this safe? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-03-01 14:29 -0800
                                                        Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-28 16:37 +0100
                                                          Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-28 15:56 +0000
                                                            Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-28 18:34 +0100
                                                              Re: Is this safe? Muttley@dastardlyhq.com - 2023-03-01 09:37 +0000
                                                                Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-01 02:29 -0800
                                                                  Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-01 19:56 +0000
                                                                    Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-01 12:53 -0800
                                                                      Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-01 21:13 +0000
                                                                        Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-02 01:48 -0800
                                                                          Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-03 21:44 +0000
                                                                            Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-03 20:16 -0800
                                                                              Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-04 22:55 +0000
                                                                                Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-05 07:11 -0800
                                                                                  Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-05 20:44 +0000
                                                                                    Re: Is this safe? Mr Flibble <flibble2@reddwarf.jmc.corp> - 2023-03-05 21:00 +0000
                                                                                      Re: Is this safe? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-03-05 13:59 -0800
                                                                                        Re: Is this safe? Mr Flibble <flibble2@reddwarf.jmc.corp> - 2023-03-05 23:07 +0000
                                                                                      Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-06 00:22 +0000
                                                                                    Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-05 14:26 -0800
                                                                                      Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-06 00:51 +0000
                                                                                        Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-06 02:17 -0800
                                                                              Re: Is this safe? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-03-05 08:13 -0800
                                                                                Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-05 09:05 -0800
                                                                        Re: Is this safe? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-03-14 09:47 -0700
                                                                      Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-03-01 14:40 -0800
                                                                      Re: Is this safe? Muttley@dastardlyhq.com - 2023-03-02 09:07 +0000
                                                                  Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-03-01 21:37 -0500
                                                                    Re: Is this safe? Öö Tiib <ootiib@hot.ee> - 2023-03-01 22:30 -0800
                                                                Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-03-01 14:27 +0100
                                                                  Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-03-01 10:48 -0800
                                                                    Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-03-02 10:29 +0100
                                                                Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-01 19:53 +0000
                                                                  Re: Is this safe? Muttley@dastardlyhq.com - 2023-03-02 09:08 +0000
                                                                    Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-02 01:32 -0800
                                                                      Re: Is this safe? Muttley@dastardlyhq.com - 2023-03-02 09:56 +0000
                                                                        Re: Is this safe? Öö Tiib <ootiib@hot.ee> - 2023-03-02 04:02 -0800
                                                                          Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-03-02 15:00 +0100
                                                                            Re: Is this safe? Öö Tiib <ootiib@hot.ee> - 2023-03-02 07:59 -0800
                                                                          Re: Is this safe? Muttley@dastardlyhq.com - 2023-03-02 15:38 +0000
                                                                            Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-03-02 11:16 -0800
                                                                    Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-03-02 11:08 -0800
                                                                      Re: Is this safe? Muttley@dastardlyhq.com - 2023-03-03 09:53 +0000
                                                                        Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-03-04 06:47 -0800
                                                                    Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-02 19:35 +0000
                                                        Re: Is this safe? "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-02-28 17:40 +0100
                                  Re: Is this safe? James Kuyper <jameskuyper@alumni.caltech.edu> - 2023-02-24 12:16 -0500
                                    Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-24 18:39 +0100
                                      Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-24 10:03 -0800
                                        Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-24 19:59 +0100
                                      Re: Is this safe? "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-02-25 06:47 +0100
                                        Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-25 10:23 +0200
                        Re: Is this safe? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-23 07:16 -0800
                          Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-23 14:31 -0800
                        Re: Is this safe? "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-02-23 16:34 +0100
                          Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 16:15 +0000
                            Re: Is this safe? "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-02-24 12:17 +0100
                              Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-24 12:24 +0000
                                Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-24 15:18 +0200
                                  Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-24 15:55 +0000
                                    Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-24 18:20 +0200
                                      Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-24 17:05 +0000
                                        Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-24 19:24 +0200
                                        Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-24 09:46 -0800
                                Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-24 17:30 +0100
                        Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-23 17:12 +0000
                    Re: Is this safe? Öö Tiib <ootiib@hot.ee> - 2023-02-23 02:47 -0800
                      Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 15:59 +0000
                        Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-23 11:55 -0500
                    Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-23 08:37 -0800
                      Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-23 14:19 -0800
                  Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-23 17:09 +0000
                    Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-23 12:21 -0500
                      Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-23 17:55 +0000
                        Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-23 13:57 -0800
                          Re: Is this safe? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-23 17:28 -0800
                            Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-23 21:44 -0800
                              Re: Is this safe? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-02-24 08:48 -0800
            Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-21 10:58 -0800
              Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-22 09:26 +0000
                Re: Is this safe? "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-02-22 22:34 +0100
                  Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 09:29 +0000
                    Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-23 08:28 -0800
                      Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 17:16 +0000
                        Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-23 22:24 -0800
                Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-22 21:30 -0800
                  Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 09:31 +0000
                    Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-23 22:00 -0800
                      Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-23 22:20 -0800
                        Re: Is this safe? James Kuyper <jameskuyper@alumni.caltech.edu> - 2023-02-24 01:34 -0500
                      Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-24 10:32 +0000
                        Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-25 00:19 -0800
              Re: Is this safe? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-22 08:09 -0800
          Re: Is this safe? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-21 22:32 -0800
            Re: Is this safe? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-02-22 08:32 -0800
              Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-22 09:17 -0800
                Re: Is this safe? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-04-04 23:28 -0700
                  Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-04-05 11:08 -0700
        Re: Is this safe? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-21 08:15 -0800

Page 5 of 11 — ← Prev page 1 … 3 4 [5] 6 7 … 11  Next page →


#89315

Fromscott@slp53.sl.home (Scott Lurndal)
Date2023-02-25 16:40 +0000
Message-ID<eSqKL.86208$5jd8.32693@fx05.iad>
In reply to#89311
David Brown <david.brown@hesbynett.no> writes:
>On 25/02/2023 12:56, Muttley@dastardlyhq.com wrote:
>> On Fri, 24 Feb 2023 17:32:57 GMT
>> scott@slp53.sl.home (Scott Lurndal) wrote:
>>> Muttley@dastardlyhq.com writes:
>>>> On Fri, 24 Feb 2023 17:20:32 +0100
>>>> David Brown <david.brown@hesbynett.no> wrote:
>>>>> On 24/02/2023 11:29, Muttley@dastardlyhq.com wrote:
>>>>>> On Thu, 23 Feb 2023 20:46:00 +0100
>>>>>> David Brown <david.brown@hesbynett.no> wrote:
>>>>>>> On 23/02/2023 17:10, Muttley@dastardlyhq.com wrote:
>>>>>>>> Sorry, I get tired of people resorting to "undefined" as some kind of get
>>>
>>>>>>>> out clause for some badly written API crashing whole program. isdigit()
>>> is
>>>>> a
>>>>>>>> yes/no function. If it is a valid digit it returns 1 else it returns 0
>>>>>>>> regardless. Crashing is a bug. End of.
>>>>>>>
>>>>>>> Sorry, I get tired of people who think /their/ ideas of how languages
>>>>>>> work is somehow correct, despite how it contradicts the actual
>>>>>>> definition and implementations of the language.
>>>>>>
>>>>>> We're not talking about the language, we're talking about API functions.
>>>>>> the is*() functions unlike printf are not built in to the compiler.
>>>>>
>>>>> I don't know what distinction you are trying to make, but I really think
>>>>
>>>> The distinction is that with built in functions the compiler can tell you
>>>> if you're passing daft values. Eg: many compilers will warning you if you
>>>> try to pass a non pointer to %s in printf which they couldn't do at compile
>>>> time if printf was a normal library function.
>>>
>>> Why do you think that?
>>>
>>>         void        log(const char *, ...)
>>>             __attribute__((format(printf, 2, 3)));
>>>         size_t      trace(const char *, ...)
>>>             __attribute__((format(printf, 2, 3)));
>> 
>> Sorry, which part of that isn't using the printf built-in?
>> 
>
>All of it.
>
>The "__attribute__" here is a gcc extension (also supported by clang) 
>that can help check the parameters for a variadic function that takes a 
>printf-style format string.  In cases like this, it is not using 
>"printf" at all - it is using a printf-style format string in a 
>completely different function.  (There's a fair chance the the 
>implementation of "log" and "trace" uses snprintf.)

actually, vsnprintf, but yes.

[toc] | [prev] | [next] | [standalone]


#89299

FromDavid Brown <david.brown@hesbynett.no>
Date2023-02-24 18:42 +0100
Message-ID<ttasus$293ua$2@dont-email.me>
In reply to#89294
On 24/02/2023 18:09, Muttley@dastardlyhq.com wrote:
> On Fri, 24 Feb 2023 17:20:32 +0100
> David Brown <david.brown@hesbynett.no> wrote:
>> On 24/02/2023 11:29, Muttley@dastardlyhq.com wrote:
>>> On Thu, 23 Feb 2023 20:46:00 +0100
>>> David Brown <david.brown@hesbynett.no> wrote:
>>>> On 23/02/2023 17:10, Muttley@dastardlyhq.com wrote:
>>>>> Sorry, I get tired of people resorting to "undefined" as some kind of get
>>>>> out clause for some badly written API crashing whole program. isdigit() is
>> a
>>>>> yes/no function. If it is a valid digit it returns 1 else it returns 0
>>>>> regardless. Crashing is a bug. End of.
>>>>
>>>> Sorry, I get tired of people who think /their/ ideas of how languages
>>>> work is somehow correct, despite how it contradicts the actual
>>>> definition and implementations of the language.
>>>
>>> We're not talking about the language, we're talking about API functions.
>>> the is*() functions unlike printf are not built in to the compiler.
>>
>> I don't know what distinction you are trying to make, but I really think
> 
> The distinction is that with built in functions the compiler can tell you
> if you're passing daft values. Eg: many compilers will warning you if you
> try to pass a non pointer to %s in printf which they couldn't do at compile
> time if printf was a normal library function.
> 

Did you not understand anything I wrote?  Or are you just refusing to 
learn in the mistaken belief that learning makes you look bad?


>>> I'm aware how it does work. I'm also saying that crashing is a bug.
>>>
>>
>> Yes - the bug is in the code that calls the function with invalid inputs.
> 
> No - the bug is in the library function not bounds checking indexes into
> an array.
> 
> Do you think not bounds checking a C array index is professional code?
> A simple yes/no will suffice.
> 

Do you intend to stop asking stupid questions?  A simple yes/no will 
suffice.

Oh, wait, some questions don't make sense as they stand - and certainly 
don't make sense in the context of a yes/no answer.

[toc] | [prev] | [next] | [standalone]


#89310

FromMuttley@dastardlyhq.com
Date2023-02-25 11:58 +0000
Message-ID<ttct48$2ibju$1@dont-email.me>
In reply to#89299
On Fri, 24 Feb 2023 18:42:52 +0100
David Brown <david.brown@hesbynett.no> wrote:
>On 24/02/2023 18:09, Muttley@dastardlyhq.com wrote:
>> Do you think not bounds checking a C array index is professional code?
>> A simple yes/no will suffice.
>> 
>
>Do you intend to stop asking stupid questions?  A simple yes/no will 
>suffice.

Answering a question with a question - you lose, thanks for playing.

>Oh, wait, some questions don't make sense as they stand - and certainly 
>don't make sense in the context of a yes/no answer.

ie:
Oh wait, some questions are awkward to answer because I'd have to say no or
look unprofessional but if I do it'll blow a hole in my argument.

[toc] | [prev] | [next] | [standalone]


#89312

FromDavid Brown <david.brown@hesbynett.no>
Date2023-02-25 16:25 +0100
Message-ID<ttd992$2jgs5$2@dont-email.me>
In reply to#89310
On 25/02/2023 12:58, Muttley@dastardlyhq.com wrote:
> On Fri, 24 Feb 2023 18:42:52 +0100
> David Brown <david.brown@hesbynett.no> wrote:
>> On 24/02/2023 18:09, Muttley@dastardlyhq.com wrote:
>>> Do you think not bounds checking a C array index is professional code?
>>> A simple yes/no will suffice.
>>>
>>
>> Do you intend to stop asking stupid questions?  A simple yes/no will
>> suffice.
> 
> Answering a question with a question - you lose, thanks for playing.
> 
>> Oh, wait, some questions don't make sense as they stand - and certainly
>> don't make sense in the context of a yes/no answer.
> 
> ie:
> Oh wait, some questions are awkward to answer because I'd have to say no or
> look unprofessional but if I do it'll blow a hole in my argument.
> 

I can give you a longer answer if you like - but not a yes/no answer.

This has nothing to do with being professional or not - "professional" 
is just a matter of whether or not you are paid for writing the code. 
It is about writing good, correct code.  I have seen plenty of paid 
professionals who write rubbish and plenty of amateurs who write good code.

Well-written code will not access an array out of bounds.

Well-written code will not pointlessly check the index before an array 
access, if it is known that the index is not out of bounds.

As I wrote before, there are some cases where functions should check 
their inputs for validity, such as certain boundary functions, or when 
you are debugging code or helping catch errors.

But if you have a function (or part of a function - such as an array 
access) that specifies a valid range for the inputs, and you are 
thinking about checking the validity of the inputs, ask yourself /why/ 
you are doing it.  Under what circumstances could the inputs be invalid? 
  Typically, the only possibility is if there is a bug in the calling 
code somewhere prior to the function being called.

Ask yourself what use you have in applying the checks - what can you do 
if the checks fail?  There is no correct answer to return, and returning 
an incorrect answer could simply lead to other failures further down the 
line - further away from the problem, and thus making bug-tracking 
harder.  In some cases, there may be an appropriate error return value, 
but often there is nothing helpful you can do when given incorrect inputs.

Ask yourself what the code of the checks are.  Ask if it is worth making 
them - it is unlikely that they will be entirely free, and so they waste 
time and space for code that is written correctly.  Often the checking 
code is never tested - frequently it is not practically possible to test 
it, and it can then lead to bigger problems.

I write code professionally, and it is /extremely/ rare that I check an 
index for bounds just before accessing an array.  It is also extremely 
rare that I have ever had out-of-bounds accesses in my code.

[toc] | [prev] | [next] | [standalone]


#89313

FromMuttley@dastardlyhq.com
Date2023-02-25 15:45 +0000
Message-ID<ttdafn$2jkk4$1@dont-email.me>
In reply to#89312
On Sat, 25 Feb 2023 16:25:22 +0100
David Brown <david.brown@hesbynett.no> wrote:
>On 25/02/2023 12:58, Muttley@dastardlyhq.com wrote:
>I write code professionally, and it is /extremely/ rare that I check an 
>index for bounds just before accessing an array.

Nuff said.

[toc] | [prev] | [next] | [standalone]


#89317

FromDavid Brown <david.brown@hesbynett.no>
Date2023-02-25 19:15 +0100
Message-ID<ttdj89$2khrp$2@dont-email.me>
In reply to#89313
On 25/02/2023 16:45, Muttley@dastardlyhq.com wrote:
> On Sat, 25 Feb 2023 16:25:22 +0100
> David Brown <david.brown@hesbynett.no> wrote:
>> On 25/02/2023 12:58, Muttley@dastardlyhq.com wrote:
>> I write code professionally, and it is /extremely/ rare that I check an
>> index for bounds just before accessing an array.
> 
> Nuff said.
> 

If that is all it takes to teach you a little bit more about how to 
write good quality code that works correctly, great.  I haven't seen 
much evidence so far of you having any ability to learn, but I'll keep 
hoping.

[toc] | [prev] | [next] | [standalone]


#89321

FromMuttley@dastardlyhq.com
Date2023-02-27 08:44 +0000
Message-ID<tthqhl$37l96$1@dont-email.me>
In reply to#89317
On Sat, 25 Feb 2023 19:15:37 +0100
David Brown <david.brown@hesbynett.no> wrote:
>On 25/02/2023 16:45, Muttley@dastardlyhq.com wrote:
>> On Sat, 25 Feb 2023 16:25:22 +0100
>> David Brown <david.brown@hesbynett.no> wrote:
>>> On 25/02/2023 12:58, Muttley@dastardlyhq.com wrote:
>>> I write code professionally, and it is /extremely/ rare that I check an
>>> index for bounds just before accessing an array.
>> 
>> Nuff said.
>> 
>
>If that is all it takes to teach you a little bit more about how to 
>write good quality code that works correctly, great.  I haven't seen 
>much evidence so far of you having any ability to learn, but I'll keep 
>hoping.

So you generally don't bother doing array bounds checking and you patronise
me about not being able to write good code??

Please, look in the mirror sometime when you get a chance.

[toc] | [prev] | [next] | [standalone]


#89323

FromDavid Brown <david.brown@hesbynett.no>
Date2023-02-27 10:40 +0100
Message-ID<tthtr7$37ui1$3@dont-email.me>
In reply to#89321
On 27/02/2023 09:44, Muttley@dastardlyhq.com wrote:
> On Sat, 25 Feb 2023 19:15:37 +0100
> David Brown <david.brown@hesbynett.no> wrote:
>> On 25/02/2023 16:45, Muttley@dastardlyhq.com wrote:
>>> On Sat, 25 Feb 2023 16:25:22 +0100
>>> David Brown <david.brown@hesbynett.no> wrote:
>>>> On 25/02/2023 12:58, Muttley@dastardlyhq.com wrote:
>>>> I write code professionally, and it is /extremely/ rare that I check an
>>>> index for bounds just before accessing an array.
>>>
>>> Nuff said.
>>>
>>
>> If that is all it takes to teach you a little bit more about how to
>> write good quality code that works correctly, great.  I haven't seen
>> much evidence so far of you having any ability to learn, but I'll keep
>> hoping.
> 
> So you generally don't bother doing array bounds checking and you patronise
> me about not being able to write good code??
> 

Yes.

I write efficient code for small devices.  Why should I waste processor 
time checking something that I know is correct?

Good programming involves splitting tasks into subtasks, where each 
subtask will do its own job.  Subtasks, or functions, will have 
specifications - sometimes written out explicitly, sometimes (especially 
for small local functions) obvious.  Every function can assume its 
preconditions are satisfied when it is called - it is the job of the 
/calling/ function to get that right.

Having each bit of code doing the job of other bits of code is just a 
waste of everyone's time and effort, and leads to pointless redundancy 
(not useful redundancy) and untestable and unmaintainable code.  And it 
encourages others to do a bad job - the guy writing the calling function 
can be lazy because he thinks the called function will do all the work.

I don't do array bounds checking.  I write code that accesses arrays 
with the index value that is correct for the requirements of the program 
- additional checks are therefore worse than useless.

[toc] | [prev] | [next] | [standalone]


#89324

FromMuttley@dastardlyhq.com
Date2023-02-27 10:24 +0000
Message-ID<tti0df$387kk$1@dont-email.me>
In reply to#89323
On Mon, 27 Feb 2023 10:40:55 +0100
David Brown <david.brown@hesbynett.no> wrote:
>I don't do array bounds checking.  I write code that accesses arrays 
>with the index value that is correct for the requirements of the program 
>- additional checks are therefore worse than useless.

I wonder how many C programmers thought that only to see their masterpiece
die in a heap?

Unless you're only doing array access in a loop up to array size or via literals
then I suspect your code will come unstuck one day.

[toc] | [prev] | [next] | [standalone]


#89325

FromDavid Brown <david.brown@hesbynett.no>
Date2023-02-27 18:31 +0100
Message-ID<ttipdo$3ai3f$1@dont-email.me>
In reply to#89324
On 27/02/2023 11:24, Muttley@dastardlyhq.com wrote:
> On Mon, 27 Feb 2023 10:40:55 +0100
> David Brown <david.brown@hesbynett.no> wrote:
>> I don't do array bounds checking.  I write code that accesses arrays
>> with the index value that is correct for the requirements of the program
>> - additional checks are therefore worse than useless.
> 
> I wonder how many C programmers thought that only to see their masterpiece
> die in a heap?
> 
> Unless you're only doing array access in a loop up to array size or via literals
> then I suspect your code will come unstuck one day.
> 

I suspect you haven't a clue about how I work and what my code does.  I 
suspect you have never learned anything about serious programming, but 
merely had a few courses in C and C++ - that would explain why you don't 
understand basic concepts such as specifications.

I could be wrong, of course - maybe you have had decent courses but did 
not understand them, or simply think that you know better than others.

In the meantime, I will continue to write code that does what it is 
specified to do.  Of course I make mistakes sometimes, and have to find 
and fix the bugs, but obsessing about pointless checks for one 
particular type of potential bugs is no help to anyone.  It's just an 
excuse for not thinking and not paying attention to what you are doing.


[toc] | [prev] | [next] | [standalone]


#89326

FromMuttley@dastardlyhq.com
Date2023-02-28 08:38 +0000
Message-ID<ttkei3$3icdl$1@dont-email.me>
In reply to#89325
On Mon, 27 Feb 2023 18:31:35 +0100
David Brown <david.brown@hesbynett.no> wrote:
>On 27/02/2023 11:24, Muttley@dastardlyhq.com wrote:
>> On Mon, 27 Feb 2023 10:40:55 +0100
>> David Brown <david.brown@hesbynett.no> wrote:
>>> I don't do array bounds checking.  I write code that accesses arrays
>>> with the index value that is correct for the requirements of the program
>>> - additional checks are therefore worse than useless.
>> 
>> I wonder how many C programmers thought that only to see their masterpiece
>> die in a heap?
>> 
>> Unless you're only doing array access in a loop up to array size or via
>literals
>> then I suspect your code will come unstuck one day.
>> 
>
>I suspect you haven't a clue about how I work and what my code does.  I 
>suspect you have never learned anything about serious programming, but 
>merely had a few courses in C and C++ - that would explain why you don't 
>understand basic concepts such as specifications.

I've written C and C++ in aerospace including Misra C to SIL4 standard and
even that doesn't spoon feed the developer to bounds check their array indexes
as its a given than any half decent developer would do it where required.

I've probably forgotten more about writing secure software than you ever knew
but if being patronising makes you feel better then go for it.

>and fix the bugs, but obsessing about pointless checks for one 
>particular type of potential bugs is no help to anyone.  It's just an 
>excuse for not thinking and not paying attention to what you are doing.

Whatever you say. I'm surprised you even post to a C++ group as why would you
need the safety benefits of the language when clearly you're a master of 
unchecked accesses? Real programmers don't bounds check arrays or check for
valid pointer values before they use them - just do a Nike, right?

[toc] | [prev] | [next] | [standalone]


#89327

FromÖö Tiib <ootiib@hot.ee>
Date2023-02-28 01:33 -0800
Message-ID<0bbf069e-e551-4cc8-83d2-3535a9ce7ea1n@googlegroups.com>
In reply to#89326
On Tuesday, 28 February 2023 at 10:38:43 UTC+2, Mut...@dastardlyhq.com wrote:
> On Mon, 27 Feb 2023 18:31:35 +0100
> David Brown <david...@hesbynett.no> wrote: 
>
> >and fix the bugs, but obsessing about pointless checks for one 
> >particular type of potential bugs is no help to anyone. It's just an 
> >excuse for not thinking and not paying attention to what you are doing.
> 
> Whatever you say. I'm surprised you even post to a C++ group as why would you 
> need the safety benefits of the language when clearly you're a master of 
> unchecked accesses? Real programmers don't bounds check arrays or check for 
> valid pointer values before they use them - just do a Nike, right?

It is not safety benefit that out of bounds access is undefined behavior.
We have to use tools like valgrind, debug versions of standard library and
sanitisers to catch bounds access errors during testing. However if
everybody would start to write bounds check code to every place where
array is accessed then that would turn the code into unreadable.
Also what your code does when it realized that index that should not
be out of bounds is out of bounds? Can't fix the bug run time.   

In other, checked languages the programming practice is very similar
to that. They just get guaranteed exceptions or crashes always, not only
on case of a debug tool being applied.

For example if someone writes catch to ArrayIndexOutOfBoundsException
in Java then review will question it ... was it for "safety"? Let it propagate 
and crash,  can't fix programming errors run-time. Does program logic rely
on that exception? Rethink that logic ... it is rather ugly.

Similar in Swift. All array accesses return optional values there. Yet a guard
block to  detect that the result is not nil is rare as is passing the optional
to others to suffer. Instead it will be typically immediately force-unwrapped 
with ! that crashes the program when optional is nil. Code will be full of
those "potential crashes" yet hundreds of thousands users per month
and app store reports zero crashes.

[toc] | [prev] | [next] | [standalone]


#89328

FromMuttley@dastardlyhq.com
Date2023-02-28 10:17 +0000
Message-ID<ttkkc1$3ivui$1@dont-email.me>
In reply to#89327
On Tue, 28 Feb 2023 01:33:15 -0800 (PST)
=?UTF-8?B?w5bDtiBUaWli?= <ootiib@hot.ee> wrote:
>On Tuesday, 28 February 2023 at 10:38:43 UTC+2, Mut...@dastardlyhq.com wrote:
>> On Mon, 27 Feb 2023 18:31:35 +0100
>> David Brown <david...@hesbynett.no> wrote: 
>>
>> >and fix the bugs, but obsessing about pointless checks for one 
>> >particular type of potential bugs is no help to anyone. It's just an 
>> >excuse for not thinking and not paying attention to what you are doing.
>> 
>> Whatever you say. I'm surprised you even post to a C++ group as why would
>you 
>> need the safety benefits of the language when clearly you're a master of 
>> unchecked accesses? Real programmers don't bounds check arrays or check for 
>> valid pointer values before they use them - just do a Nike, right?
>
>It is not safety benefit that out of bounds access is undefined behavior.
>We have to use tools like valgrind, debug versions of standard library and
>sanitisers to catch bounds access errors during testing. However if
>everybody would start to write bounds check code to every place where
>array is accessed then that would turn the code into unreadable.

I'm not suggesting its done everywhere, but the majority of bugs in C programs
are caused by out of bounds accesses either via arrays or pointers so its 
obviously not done enough, and with attitudes like Mr Browns claiming they never
need to bother because their code is so perfect its hardly surprising.

[toc] | [prev] | [next] | [standalone]


#89329

FromÖö Tiib <ootiib@hot.ee>
Date2023-02-28 02:43 -0800
Message-ID<1217fc0a-37e1-4d3a-823d-3b07f4b39b92n@googlegroups.com>
In reply to#89328
On Tuesday, 28 February 2023 at 12:17:52 UTC+2, Mut...@dastardlyhq.com wrote:
> On Tue, 28 Feb 2023 01:33:15 -0800 (PST) 
> =?UTF-8?B?w5bDtiBUaWli?= <oot...@hot.ee> wrote: 
> >On Tuesday, 28 February 2023 at 10:38:43 UTC+2, Mut...@dastardlyhq.com wrote: 
> >> On Mon, 27 Feb 2023 18:31:35 +0100 
> >> David Brown <david...@hesbynett.no> wrote: 
> >> 
> >> >and fix the bugs, but obsessing about pointless checks for one 
> >> >particular type of potential bugs is no help to anyone. It's just an 
> >> >excuse for not thinking and not paying attention to what you are doing. 
> >> 
> >> Whatever you say. I'm surprised you even post to a C++ group as why would 
> >you 
> >> need the safety benefits of the language when clearly you're a master of 
> >> unchecked accesses? Real programmers don't bounds check arrays or check for 
> >> valid pointer values before they use them - just do a Nike, right? 
> > 
> >It is not safety benefit that out of bounds access is undefined behavior. 
> >We have to use tools like valgrind, debug versions of standard library and 
> >sanitisers to catch bounds access errors during testing. However if 
> >everybody would start to write bounds check code to every place where 
> >array is accessed then that would turn the code into unreadable.
> 
> I'm not suggesting its done everywhere, but the majority of bugs in C programs 
> are caused by out of bounds accesses either via arrays or pointers so its 
> obviously not done enough, and with attitudes like Mr Browns claiming they never 
> need to bother because their code is so perfect its hardly surprising.

Yes, lot of bugs are because of out of bounds accesses. No, that does not
indicate that code lacks checks. That indicates that unit tests are missing, 
testing is  inadequate and/or that tools that I mentioned are not used. So
bugs are not found and not fixed. Or otherwise let me reiterate: What your
code does when it realized that index that should not be out of bounds is
out of bounds? Can't fix the bug run time. 


[toc] | [prev] | [next] | [standalone]


#89337

FromDavid Brown <david.brown@hesbynett.no>
Date2023-02-28 16:50 +0100
Message-ID<ttl7sg$3kv5d$5@dont-email.me>
In reply to#89329
On 28/02/2023 11:43, Öö Tiib wrote:
> On Tuesday, 28 February 2023 at 12:17:52 UTC+2, Mut...@dastardlyhq.com wrote:
>> On Tue, 28 Feb 2023 01:33:15 -0800 (PST)
>> =?UTF-8?B?w5bDtiBUaWli?= <oot...@hot.ee> wrote:
>>> On Tuesday, 28 February 2023 at 10:38:43 UTC+2, Mut...@dastardlyhq.com wrote:
>>>> On Mon, 27 Feb 2023 18:31:35 +0100
>>>> David Brown <david...@hesbynett.no> wrote:
>>>>
>>>>> and fix the bugs, but obsessing about pointless checks for one
>>>>> particular type of potential bugs is no help to anyone. It's just an
>>>>> excuse for not thinking and not paying attention to what you are doing.
>>>>
>>>> Whatever you say. I'm surprised you even post to a C++ group as why would
>>> you
>>>> need the safety benefits of the language when clearly you're a master of
>>>> unchecked accesses? Real programmers don't bounds check arrays or check for
>>>> valid pointer values before they use them - just do a Nike, right?
>>>
>>> It is not safety benefit that out of bounds access is undefined behavior.
>>> We have to use tools like valgrind, debug versions of standard library and
>>> sanitisers to catch bounds access errors during testing. However if
>>> everybody would start to write bounds check code to every place where
>>> array is accessed then that would turn the code into unreadable.
>>
>> I'm not suggesting its done everywhere, but the majority of bugs in C programs
>> are caused by out of bounds accesses either via arrays or pointers so its
>> obviously not done enough, and with attitudes like Mr Browns claiming they never
>> need to bother because their code is so perfect its hardly surprising.
> 
> Yes, lot of bugs are because of out of bounds accesses. No, that does not
> indicate that code lacks checks. That indicates that unit tests are missing,
> testing is  inadequate and/or that tools that I mentioned are not used. So
> bugs are not found and not fixed. Or otherwise let me reiterate: What your
> code does when it realized that index that should not be out of bounds is
> out of bounds? Can't fix the bug run time.
> 

Exactly.

I have nothing against appropriate checks at the right places.  I am 
against thoughtless and pointless checks that generally can't be tested, 
and can't do anything useful if the checks fail.  The correct answer is 
to make sure the calling code is developed correctly.  If you can't do 
that - perhaps the calling code is written by a different group - /then/ 
extra checks might be useful and you must specify how failures are 
handled (logs, crashes, hope for the best, email the developers' boss, 
etc.).

Thus public API's for a high-level library can often include extra checks.

Low-level code should not, except when it is a useful aid to debugging.

[toc] | [prev] | [next] | [standalone]


#89330

FromMalcolm McLean <malcolm.arthur.mclean@gmail.com>
Date2023-02-28 03:19 -0800
Message-ID<6a656dfd-b9df-4f16-9b1c-c7c1af5ec76dn@googlegroups.com>
In reply to#89326
On Tuesday, 28 February 2023 at 08:38:43 UTC, Mut...@dastardlyhq.com wrote:
> 
> I've written C and C++ in aerospace including Misra C to SIL4 standard and 
> even that doesn't spoon feed the developer to bounds check their array indexes 
> as its a given than any half decent developer would do it where required. 
> 
It's a question of "defensive programming".

With the code fragment
void deleteentry(OBJECT *obj, int N, int index)
{
   if (index >= 0 && index < N)
       /* do deletion */
}

We suppress a crash if index is out of bounds. But that makes it harder to find the 
place where the index calculation goes wrong. So it's very debateable whether to keep
the test in.

[toc] | [prev] | [next] | [standalone]


#89331

FromRichard Damon <Richard@Damon-Family.org>
Date2023-02-28 08:10 -0500
Message-ID<b3nLL.865108$MVg8.479240@fx12.iad>
In reply to#89330
On 2/28/23 6:19 AM, Malcolm McLean wrote:
> On Tuesday, 28 February 2023 at 08:38:43 UTC, Mut...@dastardlyhq.com wrote:
>>
>> I've written C and C++ in aerospace including Misra C to SIL4 standard and
>> even that doesn't spoon feed the developer to bounds check their array indexes
>> as its a given than any half decent developer would do it where required.
>>
> It's a question of "defensive programming".
> 
> With the code fragment
> void deleteentry(OBJECT *obj, int N, int index)
> {
>     if (index >= 0 && index < N)
>         /* do deletion */
> }
> 
> We suppress a crash if index is out of bounds. But that makes it harder to find the
> place where the index calculation goes wrong. So it's very debateable whether to keep
> the test in.

Well, the answer to that is we should have an else clause that at 
minimum logs the error, and perhaps core dumps and ends.

Of course, that is only appropriate if the function isn't supposed to be 
called with bad indexes.

Sometimes the API is defined to be defensive, and "out of bounds" are 
considered "legal" and to be quietyl ignored, but, as you imply, that 
makes it harder to find errors that are creating the bad indexes.

APIs that require the caller to be sure of the validity of the 
parameters lets us locate better where problems occur. That ALLOWS (but 
doesn't require) the adding of test code to recheck and core dump on 
errors, and then allows that removal for production.

A properly written program will never envoke undefined behavior, so the 
unneeded checks aren't needed. But allowing them to be noisy helps get 
the program into that state of being properly written.

APIs that require quiet ignoring just get in the way.

[toc] | [prev] | [next] | [standalone]


#89332

FromMalcolm McLean <malcolm.arthur.mclean@gmail.com>
Date2023-02-28 05:42 -0800
Message-ID<226d7d23-3b7d-46ae-b27a-87bacf71bcben@googlegroups.com>
In reply to#89331
On Tuesday, 28 February 2023 at 13:10:46 UTC, Richard Damon wrote:
> On 2/28/23 6:19 AM, Malcolm McLean wrote: 
> > On Tuesday, 28 February 2023 at 08:38:43 UTC, Mut...@dastardlyhq.com wrote: 
> >> 
> >> I've written C and C++ in aerospace including Misra C to SIL4 standard and 
> >> even that doesn't spoon feed the developer to bounds check their array indexes 
> >> as its a given than any half decent developer would do it where required. 
> >> 
> > It's a question of "defensive programming". 
> > 
> > With the code fragment 
> > void deleteentry(OBJECT *obj, int N, int index) 
> > { 
> > if (index >= 0 && index < N) 
> > /* do deletion */ 
> > } 
> > 
> > We suppress a crash if index is out of bounds. But that makes it harder to find the 
> > place where the index calculation goes wrong. So it's very debateable whether to keep 
> > the test in.
> Well, the answer to that is we should have an else clause that at 
> minimum logs the error, and perhaps core dumps and ends. 
> 
Generally you can't log the error, at least in a production setting.
For example my code is ultimately released as a drawing package for artists.
It's not acceptable to log an error, because that would generate calls to 
customer support which we wouldn't be able to handle effectively. That's
quite common. In any sort of consumer / end user setting, it's not usually
appropriate to involve the customer in debugging.
 

[toc] | [prev] | [next] | [standalone]


#89333

FromRichard Damon <Richard@Damon-Family.org>
Date2023-02-28 09:39 -0500
Message-ID<vmoLL.1220574$iS99.956061@fx16.iad>
In reply to#89332
On 2/28/23 8:42 AM, Malcolm McLean wrote:
> On Tuesday, 28 February 2023 at 13:10:46 UTC, Richard Damon wrote:
>> On 2/28/23 6:19 AM, Malcolm McLean wrote:
>>> On Tuesday, 28 February 2023 at 08:38:43 UTC, Mut...@dastardlyhq.com wrote:
>>>>
>>>> I've written C and C++ in aerospace including Misra C to SIL4 standard and
>>>> even that doesn't spoon feed the developer to bounds check their array indexes
>>>> as its a given than any half decent developer would do it where required.
>>>>
>>> It's a question of "defensive programming".
>>>
>>> With the code fragment
>>> void deleteentry(OBJECT *obj, int N, int index)
>>> {
>>> if (index >= 0 && index < N)
>>> /* do deletion */
>>> }
>>>
>>> We suppress a crash if index is out of bounds. But that makes it harder to find the
>>> place where the index calculation goes wrong. So it's very debateable whether to keep
>>> the test in.
>> Well, the answer to that is we should have an else clause that at
>> minimum logs the error, and perhaps core dumps and ends.
>>
> Generally you can't log the error, at least in a production setting.
> For example my code is ultimately released as a drawing package for artists.
> It's not acceptable to log an error, because that would generate calls to
> customer support which we wouldn't be able to handle effectively. That's
> quite common. In any sort of consumer / end user setting, it's not usually
> appropriate to involve the customer in debugging.
>   

No, you can still generally "log" the error, you just do it in a way 
that the customer can't normally see. You likely want the log to auto 
clear after some time, but then if the customer DOES have an issue and 
contacts support, they can do something to retrieve recent problem reports.

Sort of like your car, there are lots of errors that might occur that 
get put into the internal log that don't bring up an "idiot" light, and 
at service time they can check for problems, or if a light does come on, 
they can look at the log to diagnose.

[toc] | [prev] | [next] | [standalone]


#89334

FromMalcolm McLean <malcolm.arthur.mclean@gmail.com>
Date2023-02-28 07:12 -0800
Message-ID<70da1761-8fc8-49f3-9151-bef7e979261en@googlegroups.com>
In reply to#89333
On Tuesday, 28 February 2023 at 14:39:37 UTC, Richard Damon wrote:
> On 2/28/23 8:42 AM, Malcolm McLean wrote: 
> > On Tuesday, 28 February 2023 at 13:10:46 UTC, Richard Damon wrote: 
> >> On 2/28/23 6:19 AM, Malcolm McLean wrote: 
> >>> On Tuesday, 28 February 2023 at 08:38:43 UTC, Mut...@dastardlyhq.com wrote: 
> >>>> 
> >>>> I've written C and C++ in aerospace including Misra C to SIL4 standard and 
> >>>> even that doesn't spoon feed the developer to bounds check their array indexes 
> >>>> as its a given than any half decent developer would do it where required. 
> >>>> 
> >>> It's a question of "defensive programming". 
> >>> 
> >>> With the code fragment 
> >>> void deleteentry(OBJECT *obj, int N, int index) 
> >>> { 
> >>> if (index >= 0 && index < N) 
> >>> /* do deletion */ 
> >>> } 
> >>> 
> >>> We suppress a crash if index is out of bounds. But that makes it harder to find the 
> >>> place where the index calculation goes wrong. So it's very debateable whether to keep 
> >>> the test in. 
> >> Well, the answer to that is we should have an else clause that at 
> >> minimum logs the error, and perhaps core dumps and ends. 
> >> 
> > Generally you can't log the error, at least in a production setting. 
> > For example my code is ultimately released as a drawing package for artists. 
> > It's not acceptable to log an error, because that would generate calls to 
> > customer support which we wouldn't be able to handle effectively. That's 
> > quite common. In any sort of consumer / end user setting, it's not usually 
> > appropriate to involve the customer in debugging. 
> >
> No, you can still generally "log" the error, you just do it in a way 
> that the customer can't normally see. You likely want the log to auto 
> clear after some time, but then if the customer DOES have an issue and 
> contacts support, they can do something to retrieve recent problem reports. 
> 
> Sort of like your car, there are lots of errors that might occur that 
> get put into the internal log that don't bring up an "idiot" light, and 
> at service time they can check for problems, or if a light does come on, 
> they can look at the log to diagnose.
>
The decision to set up that sort of log is taken by the people who design the
system, in that case probably the systems architect appointed by the automobile
manufacturer. He might then provide an interface so that third party
programmers can access the system and generate reports.
But I can't really set up a logging system myself, in the absence of a package-wide
system. We could make it work, of course, but it would be inappropriate. Though in
fact we are in the process of developing a company wide logging system to log 
the usage patterns of our portions of the software. I couldn't untilaterally decide
to extend or abuse that to log programming errors, however .
In most programming, you are seldom working on a one man project where you
are taking all the decisions yourself.

[toc] | [prev] | [next] | [standalone]


Page 5 of 11 — ← Prev page 1 … 3 4 [5] 6 7 … 11  Next page →

Back to top | Article view | comp.lang.c++


csiph-web