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


Groups > comp.lang.c > #10412 > unrolled thread

Testing if a pointer is valid

Started byjacob navia <jacob@spamsink.net>
First post2011-09-18 00:29 +0200
Last post2011-09-20 00:22 -0700
Articles 20 on this page of 284 — 42 participants

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


Contents

  Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-18 00:29 +0200
    Re: Testing if a pointer is valid Harald van Dijk <truedfx@gmail.com> - 2011-09-17 15:38 -0700
      Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-18 00:57 +0200
        Re: Testing if a pointer is valid Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-18 16:30 +0000
          Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-18 19:25 +0200
            Re: Testing if a pointer is valid Ian Collins <ian-news@hotmail.com> - 2011-09-19 07:53 +1200
            Re: Testing if a pointer is valid Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-18 20:00 +0000
              Re: Testing if a pointer is valid Ian Collins <ian-news@hotmail.com> - 2011-09-19 08:23 +1200
                Re: Testing if a pointer is valid Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-18 20:32 +0000
                  Re: Testing if a pointer is valid cri@tiac.net (Richard Harter) - 2011-09-18 23:28 +0000
                    Re: Testing if a pointer is valid blp@cs.stanford.edu (Ben Pfaff) - 2011-09-18 16:38 -0700
                      Re: Testing if a pointer is valid cri@tiac.net (Richard Harter) - 2011-09-19 04:27 +0000
                        Re: Testing if a pointer is valid blp@cs.stanford.edu (Ben Pfaff) - 2011-09-18 21:48 -0700
                          Re: Testing if a pointer is valid cri@tiac.net (Richard Harter) - 2011-09-19 05:38 +0000
                            Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-19 09:14 +0200
                              Re: Testing if a pointer is valid "BartC" <bc@freeuk.com> - 2011-09-19 10:10 +0100
                              Re: Testing if a pointer is valid Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-09-19 05:07 -0700
                              Re: Testing if a pointer is valid Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-19 14:24 +0100
                                Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-19 16:10 +0200
                              Re: Testing if a pointer is valid "BartC" <bc@freeuk.com> - 2011-09-19 16:50 +0100
                            Re: Testing if a pointer is valid Ben Pfaff <blp@cs.stanford.edu> - 2011-09-19 08:11 -0700
                              Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-19 17:21 +0200
                              Re: Testing if a pointer is valid "BartC" <bc@freeuk.com> - 2011-09-19 16:27 +0100
                                Re: Testing if a pointer is valid Keith Thompson <kst-u@mib.org> - 2011-09-19 10:14 -0700
                                  Re: Testing if a pointer is valid "BartC" <bc@freeuk.com> - 2011-09-19 19:56 +0100
                                    Re: Testing if a pointer is valid blp@cs.stanford.edu (Ben Pfaff) - 2011-09-19 13:20 -0700
                                    Re: Testing if a pointer is valid Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-20 18:31 +0300
                                      Re: Testing if a pointer is valid "BartC" <bc@freeuk.com> - 2011-09-20 17:44 +0100
                                        Re: Testing if a pointer is valid Keith Thompson <kst-u@mib.org> - 2011-09-20 17:06 -0700
                                          Re: Testing if a pointer is valid "BartC" <bc@freeuk.com> - 2011-09-21 01:37 +0100
                                        Re: Testing if a pointer is valid Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-22 22:03 +0300
                                    Re: Testing if a pointer is valid Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-28 02:33 -0700
                                  Re: Testing if a pointer is valid ImpalerCore <jadill33@gmail.com> - 2011-09-19 13:01 -0700
                                    Re: Testing if a pointer is valid ImpalerCore <jadill33@gmail.com> - 2011-09-19 14:42 -0700
                                      Re: Testing if a pointer is valid Ian Collins <ian-news@hotmail.com> - 2011-09-20 10:08 +1200
                                        Re: Testing if a pointer is valid ImpalerCore <jadill33@gmail.com> - 2011-09-20 07:55 -0700
                              Re: Testing if a pointer is valid cri@tiac.net (Richard Harter) - 2011-09-19 16:39 +0000
                                Re: Testing if a pointer is valid blp@cs.stanford.edu (Ben Pfaff) - 2011-09-19 09:48 -0700
                              Re: Testing if a pointer is valid ImpalerCore <jadill33@gmail.com> - 2011-09-19 12:49 -0700
                                Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-19 22:45 +0200
                                  Re: Testing if a pointer is valid ImpalerCore <jadill33@gmail.com> - 2011-09-19 14:02 -0700
                        Re: Testing if a pointer is valid Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-19 07:14 +0000
                          Re: Testing if a pointer is valid cri@tiac.net (Richard Harter) - 2011-09-19 16:13 +0000
                            Re: Testing if a pointer is valid Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-19 17:36 +0000
                              Re: Testing if a pointer is valid cri@tiac.net (Richard Harter) - 2011-09-19 20:09 +0000
                          Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-19 20:36 +0200
                            Re: Testing if a pointer is valid Ian Collins <ian-news@hotmail.com> - 2011-09-20 08:05 +1200
                            Re: Testing if a pointer is valid cri@tiac.net (Richard Harter) - 2011-09-19 20:18 +0000
                              Re: Testing if a pointer is valid Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-09-19 23:37 +0000
                              Re: Testing if a pointer is valid Kenneth Brody <kenbrody@spamcop.net> - 2011-09-21 12:23 -0400
                            Re: Testing if a pointer is valid Kenneth Brody <kenbrody@spamcop.net> - 2011-09-21 12:09 -0400
                      Re: Testing if a pointer is valid websnarf <websnarf@gmail.com> - 2011-09-26 22:01 -0700
                    Re: Testing if a pointer is valid Kenneth Brody <kenbrody@spamcop.net> - 2011-09-19 13:51 -0400
                      Re: Testing if a pointer is valid cri@tiac.net (Richard Harter) - 2011-09-19 20:11 +0000
                    Re: Testing if a pointer is valid Nobody <nobody@nowhere.com> - 2011-09-19 22:21 +0100
                      Re: Testing if a pointer is valid cri@tiac.net (Richard Harter) - 2011-09-20 00:05 +0000
            Re: Testing if a pointer is valid Nobody <nobody@nowhere.com> - 2011-09-18 23:34 +0100
            Re: Testing if a pointer is valid pacman@kosh.dhis.org (Alan Curry) - 2011-09-18 22:47 +0000
            Re: Testing if a pointer is valid tom st denis <tom@iahu.ca> - 2011-09-19 04:50 -0700
            Re: Testing if a pointer is valid Kenneth Brody <kenbrody@spamcop.net> - 2011-09-19 13:42 -0400
              Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-19 20:30 +0200
                Re: Testing if a pointer is valid Ian Collins <ian-news@hotmail.com> - 2011-09-20 08:09 +1200
                  Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-19 22:38 +0200
                    Re: Testing if a pointer is valid Ike Naar <ike@iceland.freeshell.org> - 2011-09-19 20:50 +0000
                      Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-19 22:53 +0200
                        Re: Testing if a pointer is valid Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-19 22:30 +0100
                          Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-20 00:05 +0200
                            Re: Testing if a pointer is valid Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-20 00:31 +0100
                        Re: Testing if a pointer is valid Ike Naar <ike@iceland.freeshell.org> - 2011-09-19 22:43 +0000
                          Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-20 00:59 +0200
                            Re: Testing if a pointer is valid Ian Collins <ian-news@hotmail.com> - 2011-09-20 11:50 +1200
                              Re: Testing if a pointer is valid blp@cs.stanford.edu (Ben Pfaff) - 2011-09-19 19:03 -0700
                                Re: Testing if a pointer is valid Ian Collins <ian-news@hotmail.com> - 2011-09-20 14:11 +1200
                              Re: Testing if a pointer is valid Keith Thompson <kst-u@mib.org> - 2011-09-19 21:49 -0700
                              Re: Testing if a pointer is valid Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-28 06:17 -0700
                                Re: Testing if a pointer is valid Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-09-28 07:02 -0700
                            Re: Testing if a pointer is valid Ike Naar <ike@sverige.freeshell.org> - 2011-09-20 07:26 +0000
                            Re: Testing if a pointer is valid Kenneth Brody <kenbrody@spamcop.net> - 2011-09-21 12:31 -0400
                      Re: Testing if a pointer is valid Kenneth Brody <kenbrody@spamcop.net> - 2011-09-21 12:26 -0400
                        Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-21 21:20 +0200
                          Re: Testing if a pointer is valid Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-21 19:40 +0000
                          Re: Testing if a pointer is valid Ian Collins <ian-news@hotmail.com> - 2011-09-22 07:46 +1200
                        Re: Testing if a pointer is valid "Rosario Pulvirenti" <NoInUseno1Spam@non.usare.invalid> - 2011-09-22 07:38 +0200
                    Re: Testing if a pointer is valid Ian Collins <ian-news@hotmail.com> - 2011-09-20 09:05 +1200
                Re: Testing if a pointer is valid Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-20 07:16 +0000
                  Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-20 09:50 +0200
                    Re: Testing if a pointer is valid Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-20 10:38 +0000
                      Re: Testing if a pointer is valid Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-09-20 04:29 -0700
                        Re: Testing if a pointer is valid Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-20 12:04 +0000
                          Re: Testing if a pointer is valid Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-09-20 05:25 -0700
                            Re: Testing if a pointer is valid Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-20 16:49 +0000
                              Re: Testing if a pointer is valid Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-22 22:35 +0300
                                Re: Testing if a pointer is valid Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-23 07:59 +0000
                                  Re: Testing if a pointer is valid Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-23 12:33 +0300
                                    Re: Testing if a pointer is valid Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-23 12:23 +0000
                                      Re: Testing if a pointer is valid Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-23 17:34 +0300
                                        Re: Testing if a pointer is valid Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-23 17:08 +0000
                                  Re: Testing if a pointer is valid James Kuyper <jameskuyper@verizon.net> - 2011-09-23 06:49 -0400
                                    Re: Testing if a pointer is valid Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-23 12:20 +0000
                                      Re: Testing if a pointer is valid Seebs <usenet-nospam@seebs.net> - 2011-09-26 22:59 +0000
                            Re: Testing if a pointer is valid Michael Press <rubrum@pacbell.net> - 2011-09-30 01:27 -0700
                              Re: Testing if a pointer is valid Willem <willem@toad.stack.nl> - 2011-09-30 08:38 +0000
                                Re: Testing if a pointer is valid Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-10-04 12:40 +0000
                Re: Testing if a pointer is valid Kenneth Brody <kenbrody@spamcop.net> - 2011-09-21 12:00 -0400
                  Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-21 21:17 +0200
          Re: Testing if a pointer is valid cri@tiac.net (Richard Harter) - 2011-09-18 23:21 +0000
            Re: Testing if a pointer is valid Keith Thompson <kst-u@mib.org> - 2011-09-18 17:32 -0700
              Re: Testing if a pointer is valid Joe Wright <joewwright@comcast.net> - 2011-09-18 23:10 -0400
                Re: Testing if a pointer is valid gazelle@shell.xmission.com (Kenny McCormack) - 2011-09-19 03:34 +0000
                  Re: Testing if a pointer is valid Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2011-09-18 22:32 -0600
                    Re: Testing if a pointer is valid gazelle@shell.xmission.com (Kenny McCormack) - 2011-09-20 14:18 +0000
                      Re: Testing if a pointer is valid August Karlstrom <fusionfile@gmail.com> - 2011-09-20 18:15 +0200
                        Re: Testing if a pointer is valid "BartC" <bc@freeuk.com> - 2011-09-20 17:49 +0100
                          Re: Testing if a pointer is valid Willem <willem@toad.stack.nl> - 2011-09-20 17:02 +0000
                            Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-20 20:35 +0200
                              Re: Testing if a pointer is valid Ike Naar <ike@iceland.freeshell.org> - 2011-09-20 20:30 +0000
                                Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-20 22:35 +0200
                                Re: Testing if a pointer is valid Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-22 22:07 +0300
                                  Re: Testing if a pointer is valid James Kuyper <jameskuyper@verizon.net> - 2011-09-22 16:11 -0400
                                    Re: Testing if a pointer is valid Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-23 12:28 +0300
                                      Re: Testing if a pointer is valid James Kuyper <jameskuyper@verizon.net> - 2011-09-23 06:44 -0400
                                        Re: Testing if a pointer is valid Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-23 17:33 +0300
                                          Re: Testing if a pointer is valid James Kuyper <jameskuyper@verizon.net> - 2011-09-23 11:31 -0400
                                            Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-23 20:09 +0200
                                          Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-23 20:02 +0200
                                            Re: Testing if a pointer is valid Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-09-23 13:49 -0700
                                              Re: Testing if a pointer is valid Ian Collins <ian-news@hotmail.com> - 2011-09-24 09:01 +1200
                                                Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-23 23:08 +0200
                                                  Re: Testing if a pointer is valid Ian Collins <ian-news@hotmail.com> - 2011-09-24 09:43 +1200
                                                Re: Testing if a pointer is valid Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-23 22:13 +0100
                                                  Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-23 23:45 +0200
                                                    Re: Testing if a pointer is valid Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-24 00:01 +0100
                                                  Re: Testing if a pointer is valid Ian Collins <ian-news@hotmail.com> - 2011-09-24 09:47 +1200
                                                Re: Testing if a pointer is valid James Kuyper <jameskuyper@verizon.net> - 2011-09-23 17:22 -0400
                                                  Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-23 23:47 +0200
                                                  Re: Testing if a pointer is valid Ian Collins <ian-news@hotmail.com> - 2011-09-24 09:50 +1200
                                                    Re: Testing if a pointer is valid James Kuyper <jameskuyper@verizon.net> - 2011-09-23 18:06 -0400
                                                      Re: Testing if a pointer is valid Ian Collins <ian-news@hotmail.com> - 2011-09-24 10:25 +1200
                                                        Re: Testing if a pointer is valid James Kuyper <jameskuyper@verizon.net> - 2011-09-24 08:02 -0400
                                                          Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-24 14:13 +0200
                                                            Re: Testing if a pointer is valid Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-24 14:07 +0100
                                                          Re: Testing if a pointer is valid cri@tiac.net (Richard Harter) - 2011-09-24 13:15 +0000
                                                            Re: Testing if a pointer is valid Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-24 15:20 +0100
                                                            Re: Testing if a pointer is valid James Kuyper <jameskuyper@verizon.net> - 2011-09-24 11:28 -0400
                                                              Re: Testing if a pointer is valid Willem <willem@toad.stack.nl> - 2011-09-24 15:45 +0000
                                                                Re: Testing if a pointer is valid Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-24 20:07 +0300
                                                                  Re: Testing if a pointer is valid Richard Damon <news.x.richarddamon@xoxy.net> - 2011-09-24 14:31 -0400
                                                                    Re: Testing if a pointer is valid Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-24 21:49 +0100
                                                                      Re: Testing if a pointer is valid Keith Thompson <kst-u@mib.org> - 2011-09-24 14:40 -0700
                                                                        Re: Testing if a pointer is valid Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-25 01:14 +0100
                                                                          Re: Testing if a pointer is valid Tim Rentsch <txr@alumni.caltech.edu> - 2012-01-24 13:44 -0800
                                                                      Re: Testing if a pointer is valid Richard Damon <news.x.richarddamon@xoxy.net> - 2011-09-24 20:23 -0400
                                                                  Re: Testing if a pointer is valid Willem <willem@toad.stack.nl> - 2011-09-24 18:44 +0000
                                                                Re: Testing if a pointer is valid James Kuyper <jameskuyper@verizon.net> - 2011-09-25 07:04 -0400
                                                              Re: Testing if a pointer is valid cri@tiac.net (Richard Harter) - 2011-09-24 17:30 +0000
                                                              Re: Testing if a pointer is valid Keith Thompson <kst-u@mib.org> - 2011-09-24 12:34 -0700
                                                                Re: Testing if a pointer is valid Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-09-25 01:00 -0700
                                                                  Re: Testing if a pointer is valid Ian Collins <ian-news@hotmail.com> - 2011-09-25 21:30 +1300
                                                                    Re: Testing if a pointer is valid Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-09-25 05:08 -0700
                                                                      Re: Testing if a pointer is valid Ian Collins <ian-news@hotmail.com> - 2011-09-26 08:39 +1300
                                                      Re: Testing if a pointer is valid Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-24 20:04 +0300
                                              Re: Testing if a pointer is valid James Kuyper <jameskuyper@verizon.net> - 2011-09-23 17:09 -0400
                                                Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-23 23:43 +0200
                                      Re: Testing if a pointer is valid Michael Press <rubrum@pacbell.net> - 2011-09-27 20:48 -0700
                                        Re: Testing if a pointer is valid Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-10-03 19:59 +0300
                                          Re: Testing if a pointer is valid Michael Press <rubrum@pacbell.net> - 2011-10-03 17:32 -0700
                                  Re: Testing if a pointer is valid Rui Maciel <rui.maciel@gmail.com> - 2011-09-24 13:53 +0100
                            Re: Testing if a pointer is valid Rui Maciel <rui.maciel@gmail.com> - 2011-09-20 21:18 +0100
                              Re: Testing if a pointer is valid Willem <willem@toad.stack.nl> - 2011-09-20 20:35 +0000
                                Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-20 22:45 +0200
                                  Re: Testing if a pointer is valid Willem <willem@toad.stack.nl> - 2011-09-21 08:09 +0000
                                    Re: Testing if a pointer is valid Noob <root@127.0.0.1> - 2011-09-22 13:04 +0200
                                      Re: Testing if a pointer is valid Robert Wessel <robertwessel2@yahoo.com> - 2011-09-22 11:38 -0500
                                        Re: Testing if a pointer is valid Noob <root@127.0.0.1> - 2011-09-23 10:41 +0200
                                    Re: Testing if a pointer is valid Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-22 22:20 +0300
                                      Re: Testing if a pointer is valid Willem <willem@toad.stack.nl> - 2011-09-22 22:15 +0000
                                        Re: Testing if a pointer is valid Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-23 12:30 +0300
                                      Re: Testing if a pointer is valid Seebs <usenet-nospam@seebs.net> - 2011-09-26 22:59 +0000
                                        Re: Testing if a pointer is valid Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-27 02:06 +0100
                                          Re: Testing if a pointer is valid cri@tiac.net (Richard Harter) - 2011-09-27 03:39 +0000
                                            Re: Testing if a pointer is valid "Rosario Pulvirenti" <NoInUseno1Spam@non.usare.invalid> - 2011-10-03 19:51 +0200
                                              Re: Testing if a pointer is valid Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-10-03 19:11 +0100
                                                Re: Testing if a pointer is valid "Rosario Pulvirenti" <NoInUseno1Spam@non.usare.invalid> - 2011-10-04 16:20 +0200
                                            Re: Testing if a pointer is valid China Blue Corn Chips <chine.bleu@yahoo.com> - 2011-10-04 08:11 -0700
                                              Re: Testing if a pointer is valid James Kuyper <jameskuyper@verizon.net> - 2011-10-04 12:19 -0400
                                          Re: Testing if a pointer is valid Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-27 13:56 +0300
                                            Re: Testing if a pointer is valid Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-27 13:13 +0100
                                        Re: Testing if a pointer is valid Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-27 12:08 +0300
                                    Re: Testing if a pointer is valid Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-29 01:00 -0700
                                Re: Testing if a pointer is valid Rui Maciel <rui.maciel@gmail.com> - 2011-09-20 21:59 +0100
                                Re: Testing if a pointer is valid Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-22 22:08 +0300
                        Re: Testing if a pointer is valid Willem <willem@toad.stack.nl> - 2011-09-20 17:00 +0000
                          Re: Testing if a pointer is valid August Karlstrom <fusionfile@gmail.com> - 2011-09-20 20:32 +0200
                            Re: Testing if a pointer is valid gazelle@shell.xmission.com (Kenny McCormack) - 2011-09-20 18:53 +0000
                              Re: Testing if a pointer is valid August Karlstrom <fusionfile@gmail.com> - 2011-09-20 22:55 +0200
                              Re: Testing if a pointer is valid Rui Maciel <rui.maciel@gmail.com> - 2011-09-20 21:50 +0100
                                Re: Testing if a pointer is valid gazelle@shell.xmission.com (Kenny McCormack) - 2011-09-21 15:48 +0000
                                  Re: Testing if a pointer is valid Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-21 16:12 +0000
                                    Re: Testing if a pointer is valid Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-09-21 09:42 -0700
                                      Re: Testing if a pointer is valid Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-21 18:01 +0000
                                  Re: Testing if a pointer is valid Rui Maciel <rui.maciel@gmail.com> - 2011-09-21 21:00 +0100
                                Re: Testing if a pointer is valid August Karlstrom <fusionfile@gmail.com> - 2011-09-21 21:32 +0200
                                  Re: Testing if a pointer is valid Rui Maciel <rui.maciel@gmail.com> - 2011-09-22 12:40 +0100
                                    Re: Testing if a pointer is valid gazelle@shell.xmission.com (Kenny McCormack) - 2011-09-22 13:00 +0000
                                      Re: Testing if a pointer is valid Rui Maciel <rui.maciel@gmail.com> - 2011-09-22 14:54 +0100
                                        Re: Testing if a pointer is valid gazelle@shell.xmission.com (Kenny McCormack) - 2011-09-22 14:03 +0000
                                        Re: Testing if a pointer is valid Keith Thompson <kst-u@mib.org> - 2011-09-22 11:39 -0700
                                          Re: Testing if a pointer is valid Rui Maciel <rui.maciel@gmail.com> - 2011-09-24 13:44 +0100
                                            Re: Testing if a pointer is valid Keith Thompson <kst-u@mib.org> - 2011-09-24 12:23 -0700
                                      Re: Testing if a pointer is valid Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-29 04:52 -0700
                                    Re: Testing if a pointer is valid Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-29 04:51 -0700
                            Re: Testing if a pointer is valid Willem <willem@toad.stack.nl> - 2011-09-20 19:32 +0000
                              Re: Testing if a pointer is valid August Karlstrom <fusionfile@gmail.com> - 2011-09-20 22:48 +0200
                                Re: Testing if a pointer is valid James Kuyper <jameskuyper@verizon.net> - 2011-09-20 17:29 -0400
                                  Re: Testing if a pointer is valid August Karlstrom <fusionfile@gmail.com> - 2011-09-20 23:45 +0200
                                    Re: Testing if a pointer is valid James Kuyper <jameskuyper@verizon.net> - 2011-09-21 10:35 -0400
                                      Re: Testing if a pointer is valid Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-29 05:04 -0700
                                Re: Testing if a pointer is valid Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-29 04:54 -0700
                            Re: Testing if a pointer is valid Keith Thompson <kst-u@mib.org> - 2011-09-20 17:19 -0700
                              Re: Testing if a pointer is valid August Karlstrom <fusionfile@gmail.com> - 2011-09-21 23:26 +0200
                                Re: Testing if a pointer is valid Keith Thompson <kst-u@mib.org> - 2011-09-21 14:35 -0700
                                  Re: Testing if a pointer is valid August Karlstrom <fusionfile@gmail.com> - 2011-09-22 00:09 +0200
                                    Re: Testing if a pointer is valid James Kuyper <jameskuyper@verizon.net> - 2011-09-21 19:08 -0400
                            Re: Testing if a pointer is valid cri@tiac.net (Richard Harter) - 2011-09-21 05:25 +0000
                        Re: Testing if a pointer is valid Rui Maciel <rui.maciel@gmail.com> - 2011-09-20 21:11 +0100
                          Re: Testing if a pointer is valid August Karlstrom <fusionfile@gmail.com> - 2011-09-20 23:01 +0200
                            Re: Testing if a pointer is valid Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-09-21 03:11 -0700
                              Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-21 12:16 +0200
                                Re: Testing if a pointer is valid Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-09-21 03:23 -0700
                            Re: Testing if a pointer is valid Rui Maciel <rui.maciel@gmail.com> - 2011-09-21 20:44 +0100
                              Re: Testing if a pointer is valid August Karlstrom <fusionfile@gmail.com> - 2011-09-21 22:53 +0200
                                Re: Testing if a pointer is valid James Kuyper <jameskuyper@verizon.net> - 2011-09-21 23:08 -0400
                                  Re: Testing if a pointer is valid Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-09-21 21:14 -0700
                                    Re: Testing if a pointer is valid James Kuyper <jameskuyper@verizon.net> - 2011-09-22 07:17 -0400
                                  Re: Testing if a pointer is valid Rui Maciel <rui.maciel@gmail.com> - 2011-09-22 16:37 +0100
                                Re: Testing if a pointer is valid Rui Maciel <rui.maciel@gmail.com> - 2011-09-22 16:25 +0100
                                  Re: Testing if a pointer is valid Keith Thompson <kst-u@mib.org> - 2011-09-22 11:36 -0700
                                    Re: Testing if a pointer is valid Rui Maciel <rui.maciel@gmail.com> - 2011-09-24 13:37 +0100
                                      Re: Testing if a pointer is valid cri@tiac.net (Richard Harter) - 2011-09-24 13:50 +0000
                                        Re: Testing if a pointer is valid gazelle@shell.xmission.com (Kenny McCormack) - 2011-09-24 14:47 +0000
                                          Re: Testing if a pointer is valid Rui Maciel <rui.maciel@gmail.com> - 2011-09-24 20:43 +0100
                                        Re: Testing if a pointer is valid Rui Maciel <rui.maciel@gmail.com> - 2011-09-24 20:26 +0100
                                        Re: Testing if a pointer is valid Richard Damon <news.x.richarddamon@xoxy.net> - 2011-09-24 20:53 -0400
                                          Re: Testing if a pointer is valid Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-25 02:30 +0100
                                            Re: Testing if a pointer is valid Richard Damon <news.x.richarddamon@xoxy.net> - 2011-09-24 22:24 -0400
                                              Re: Testing if a pointer is valid Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-25 12:36 +0100
                              Re: Testing if a pointer is valid Keith Thompson <kst-u@mib.org> - 2011-09-21 13:56 -0700
                                Re: Testing if a pointer is valid "Rosario Pulvirenti" <NoInUseno1Spam@non.usare.invalid> - 2011-09-22 07:38 +0200
                                  Re: Testing if a pointer is valid Keith Thompson <kst-u@mib.org> - 2011-09-22 02:06 -0700
                                Re: Testing if a pointer is valid Rui Maciel <rui.maciel@gmail.com> - 2011-09-22 15:24 +0100
                                  Re: Testing if a pointer is valid Keith Thompson <kst-u@mib.org> - 2011-09-22 11:35 -0700
                                    Re: Testing if a pointer is valid Rui Maciel <rui.maciel@gmail.com> - 2011-09-24 13:25 +0100
                                Re: Testing if a pointer is valid Seebs <usenet-nospam@seebs.net> - 2011-09-26 22:59 +0000
                                  Re: Testing if a pointer is valid Tim Rentsch <txr@alumni.caltech.edu> - 2012-01-24 13:30 -0800
                              Re: Testing if a pointer is valid Nobody <nobody@nowhere.com> - 2011-09-22 18:23 +0100
                          Re: Testing if a pointer is valid gazelle@shell.xmission.com (Kenny McCormack) - 2011-09-21 15:40 +0000
                            Re: Testing if a pointer is valid Rui Maciel <rui.maciel@gmail.com> - 2011-09-21 20:20 +0100
                Re: Testing if a pointer is valid Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-19 06:39 +0000
                  Re: Testing if a pointer is valid Keith Thompson <kst-u@mib.org> - 2011-09-19 10:06 -0700
                    Re: Testing if a pointer is valid Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-20 07:03 +0000
                Re: Testing if a pointer is valid pete <pfiland@mindspring.com> - 2011-09-19 19:17 -0400
                Re: Testing if a pointer is valid Rui Maciel <rui.maciel@gmail.com> - 2011-09-20 20:57 +0100
              Re: Testing if a pointer is valid cri@tiac.net (Richard Harter) - 2011-09-19 05:14 +0000
                Re: Testing if a pointer is valid Ian Collins <ian-news@hotmail.com> - 2011-09-19 18:02 +1200
                  Re: Testing if a pointer is valid cri@tiac.net (Richard Harter) - 2011-09-19 06:18 +0000
              Re: Testing if a pointer is valid August Karlstrom <fusionfile@gmail.com> - 2011-09-19 17:50 +0200
                Re: Testing if a pointer is valid August Karlstrom <fusionfile@gmail.com> - 2011-09-19 20:45 +0200
              Re: Testing if a pointer is valid Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-28 08:05 -0700
                Re: Testing if a pointer is valid Keith Thompson <kst-u@mib.org> - 2011-09-28 09:14 -0700
            Re: Testing if a pointer is valid Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-09-18 23:52 -0700
            Re: Testing if a pointer is valid Rui Maciel <rui.maciel@gmail.com> - 2011-09-20 20:45 +0100
              Re: Testing if a pointer is valid August Karlstrom <fusionfile@gmail.com> - 2011-09-20 23:35 +0200
                Re: Testing if a pointer is valid Rui Maciel <rui.maciel@gmail.com> - 2011-09-21 19:53 +0100
    Re: Testing if a pointer is valid "BartC" <bc@freeuk.com> - 2011-09-17 23:54 +0100
      Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-18 00:59 +0200
    Re: Testing if a pointer is valid Heikki Kallasjoki <fis+usenet@zem.fi> - 2011-09-17 23:35 +0000
      Re: Testing if a pointer is valid jacob navia <jacob@spamsink.net> - 2011-09-18 01:47 +0200
    Re: Testing if a pointer is valid Geoff <geoff@invalid.invalid> - 2011-09-17 17:15 -0700
    Re: Testing if a pointer is valid Максим Фомин <maxim@maxim-fomin.ru> - 2011-09-18 00:43 -0700
    Re: Testing if a pointer is valid "Rosario Pulvirenti" <NoInUseno1Spam@non.usare.invalid> - 2011-09-18 10:34 +0200
      Re: Testing if a pointer is valid "Rosario Pulvirenti" <NoInUseno1Spam@non.usare.invalid> - 2011-09-20 09:28 +0200
    Re: Testing if a pointer is valid Ike Naar <ike@iceland.freeshell.org> - 2011-09-18 12:55 +0000
    Re: Testing if a pointer is valid "Joel C. Salomon" <joelcsalomon@gmail.com> - 2011-09-19 10:29 -0400
    Re: Testing if a pointer is valid China Blue Corn Chips <chine.bleu@yahoo.com> - 2011-09-20 00:22 -0700

Page 14 of 15 — ← Prev page 1 … 12 13 [14] 15  Next page →


#10543

Frompete <pfiland@mindspring.com>
Date2011-09-19 19:17 -0400
Message-ID<4E77CD96.3419@mindspring.com>
In reply to#10468
Joe Wright wrote:
> 
> On 9/18/2011 20:32, Keith Thompson wrote:
> > cri@tiac.net (Richard Harter) writes:
> > [...]
> >> Any language in which it is possible
> >> for a pointer to be invalid but
> >> which provides no way to test for validity is fundamentally flawed.
> >
> > What existing language has pointers
> > and is not "fundamentally flawed"?
> >
> Indeed. Testing a pointer by simple inspection
> can tell you whether it is null or not.
> If it is null it is not valid.
> If not you simply can't tell.

"null" isn't the last word as to whether or not a pointer is valid.
"validity" is context dependent.

The most invalid pointer value, is an indeterminate pointer value.
You can't do anything with an indeterminate pointer value.

Next on the list, is a null pointer value.
There's nothing wrong with
    int *a = 0;
    int *b = a;
    if (b == a) free(a);

Next on the list, is the one past pointer.
You can do pointer arithmetic with the one past pointer.
    int a;
    int *one_past = &a + 1;
    if (one_past - 1 == &a) one_past[-1] = 5;

And there are also operators, such as greater than (>)
which have their own specifications 
as to what's valid and what isn't.
Given:
    int a;
    int b;
    int *one_past = &a + 1;

This is valid:
    if (one_past > &a) ;

This isn't valid:
    if (&b > &a) ;

-- 
pete

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


#10594

FromRui Maciel <rui.maciel@gmail.com>
Date2011-09-20 20:57 +0100
Message-ID<4e78f025$0$24701$a729d347@news.telepac.pt>
In reply to#10468
Joe Wright wrote:

> Indeed. Testing a pointer by simple inspection can tell you whether it is
> null or not. If it is null it is not valid. If not you simply can't tell.

A pointer being null or not tends to be a good enough sign that a pointer is 
valid or not.  If you put in practice a basic policy of adequately 
initializing pointers and implementing a basic policy where the 
responsibility of allocating and freeing memory is clearly established then 
you only stumble on pointer problems if you fail to follow your own memory 
allocation policy.  If you happen to write code which makes use of 
dynamically allocated memory while failing to adhere to such a basic 
principle then you can only complain about how you are handling things, not 
the tool you happen to be using at the time.


Rui Maciel

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


#10473

Fromcri@tiac.net (Richard Harter)
Date2011-09-19 05:14 +0000
Message-ID<4e76c6ed.301549012@text.giganews.com>
In reply to#10459
On Sun, 18 Sep 2011 17:32:55 -0700, Keith Thompson <kst-u@mib.org>
wrote:

>cri@tiac.net (Richard Harter) writes:
>[...]
>> Any language in which it is possible for a pointer to be invalid but
>> which provides no way to test for validity is fundamentally flawed.
>
>What existing language has pointers and is not "fundamentally flawed"?

Please do not snip the relevant text, i.e.

>>>If you need code to check whether or not a pointer is valid, _your code_
>>>is fundamentally flawed.
>>
>> Any language in which it is possible for a pointer to be invalid but
>> which provides no way to test for validity is fundamentally flawed.

I was making a (mildly sarcastic) point about the statement I was
commenting on.  

That said, I dunno off hand about languages that have pointers and
aren't fundamentally flawed.  It depends on what counts as pointers.
If "pointer" means "address" you're out of luck.  Once you get into
the world of smart pointers and references it's a different matter.

The interesting thing is that it isn't hard for a language to have
references that can be tested for validity.





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


#10476

FromIan Collins <ian-news@hotmail.com>
Date2011-09-19 18:02 +1200
Message-ID<9do478Fr5dU15@mid.individual.net>
In reply to#10473
On 09/19/11 05:14 PM, Richard Harter wrote:
> On Sun, 18 Sep 2011 17:32:55 -0700, Keith Thompson<kst-u@mib.org>
> wrote:
>
>> cri@tiac.net (Richard Harter) writes:
>> [...]
>>> Any language in which it is possible for a pointer to be invalid but
>>> which provides no way to test for validity is fundamentally flawed.
>>
>> What existing language has pointers and is not "fundamentally flawed"?
>
> Please do not snip the relevant text, i.e.
>
>>>> If you need code to check whether or not a pointer is valid, _your code_
>>>> is fundamentally flawed.
>>>
>>> Any language in which it is possible for a pointer to be invalid but
>>> which provides no way to test for validity is fundamentally flawed.
>
> I was making a (mildly sarcastic) point about the statement I was
> commenting on.
>
> That said, I dunno off hand about languages that have pointers and
> aren't fundamentally flawed.  It depends on what counts as pointers.
> If "pointer" means "address" you're out of luck.  Once you get into
> the world of smart pointers and references it's a different matter.
>
> The interesting thing is that it isn't hard for a language to have
> references that can be tested for validity.

That's normally a case of prevention by controlling what can be be used 
to initialise a reference rather than by detection.

-- 
Ian Collins

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


#10478

Fromcri@tiac.net (Richard Harter)
Date2011-09-19 06:18 +0000
Message-ID<4e76ddf6.307446692@text.giganews.com>
In reply to#10476
On Mon, 19 Sep 2011 18:02:15 +1200, Ian Collins <ian-news@hotmail.com>
wrote:

>On 09/19/11 05:14 PM, Richard Harter wrote:
>> On Sun, 18 Sep 2011 17:32:55 -0700, Keith Thompson<kst-u@mib.org>
>> wrote:
>>
>>> cri@tiac.net (Richard Harter) writes:
>>> [...]
>>>> Any language in which it is possible for a pointer to be invalid but
>>>> which provides no way to test for validity is fundamentally flawed.
>>>
>>> What existing language has pointers and is not "fundamentally flawed"?
>>
>> Please do not snip the relevant text, i.e.
>>
>>>>> If you need code to check whether or not a pointer is valid, _your code_
>>>>> is fundamentally flawed.
>>>>
>>>> Any language in which it is possible for a pointer to be invalid but
>>>> which provides no way to test for validity is fundamentally flawed.
>>
>> I was making a (mildly sarcastic) point about the statement I was
>> commenting on.
>>
>> That said, I dunno off hand about languages that have pointers and
>> aren't fundamentally flawed.  It depends on what counts as pointers.
>> If "pointer" means "address" you're out of luck.  Once you get into
>> the world of smart pointers and references it's a different matter.
>>
>> The interesting thing is that it isn't hard for a language to have
>> references that can be tested for validity.
>
>That's normally a case of prevention by controlling what can be be used 
>to initialise a reference rather than by detection.

That may be - I think that's what fortran does.  But that's only half
of it; you need to be able to detect whether a reference is stale.
That's a trifle more complicated.


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


#10498

FromAugust Karlstrom <fusionfile@gmail.com>
Date2011-09-19 17:50 +0200
Message-ID<j57ocl$li9$1@dont-email.me>
In reply to#10459
On 2011-09-19 02:32, Keith Thompson wrote:
> cri@tiac.net (Richard Harter) writes:
> [...]
>> Any language in which it is possible for a pointer to be invalid but
>> which provides no way to test for validity is fundamentally flawed.
>
> What existing language has pointers and is not "fundamentally flawed"?

Oberon comes to mind.


August

-- 
The competent programmer is fully aware of the limited size of his own 
skull. He therefore approaches his task with full humility, and avoids 
clever tricks like the plague. --Edsger Dijkstra

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


#10515

FromAugust Karlstrom <fusionfile@gmail.com>
Date2011-09-19 20:45 +0200
Message-ID<j582l1$ujn$1@dont-email.me>
In reply to#10498
On 2011-09-19 17:50, August Karlstrom wrote:
> On 2011-09-19 02:32, Keith Thompson wrote:
>> cri@tiac.net (Richard Harter) writes:
>> [...]
>>> Any language in which it is possible for a pointer to be invalid but
>>> which provides no way to test for validity is fundamentally flawed.
>>
>> What existing language has pointers and is not "fundamentally flawed"?
>
> Oberon comes to mind.

Never mind. I misread Richard's statement as something along the lines 
of "any language with non-safe pointers is fundamentally flawed." The 
best solution is of course if the language can prevent invalid pointers 
in the first place. In Oberon the only invalid pointers are 
uninitialized local pointer variables but a compiler will typically 
issue a warning if such a variable is used before being initialized.


August

-- 
The competent programmer is fully aware of the limited size of his own 
skull. He therefore approaches his task with full humility, and avoids 
clever tricks like the plague. --Edsger Dijkstra

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


#11050

FromNick Keighley <nick_keighley_nospam@hotmail.com>
Date2011-09-28 08:05 -0700
Message-ID<c786d1d7-bfd3-40a0-8b2f-9c0e10a4ed5a@8g2000yqm.googlegroups.com>
In reply to#10459
On Sep 19, 1:32 am, Keith Thompson <ks...@mib.org> wrote:
> c...@tiac.net (Richard Harter) writes:
>
> [...]
>
> > Any language in which it is possible for a pointer to be invalid but
> > which provides no way to test for validity is fundamentally flawed.
>
> What existing language has pointers and is not "fundamentally flawed"?

Pascal?
Which has its flaw in the Pascal equivalent of union, but not I
believe in its pointers.

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


#11053

FromKeith Thompson <kst-u@mib.org>
Date2011-09-28 09:14 -0700
Message-ID<lnzkhozls5.fsf@nuthaus.mib.org>
In reply to#11050
Nick Keighley <nick_keighley_nospam@hotmail.com> writes:
> On Sep 19, 1:32 am, Keith Thompson <ks...@mib.org> wrote:
>> c...@tiac.net (Richard Harter) writes:
>>
>> [...]
>>
>> > Any language in which it is possible for a pointer to be invalid but
>> > which provides no way to test for validity is fundamentally flawed.
>>
>> What existing language has pointers and is not "fundamentally flawed"?
>
> Pascal?
> Which has its flaw in the Pascal equivalent of union, but not I
> believe in its pointers.

Maybe.  Some versions of Pascal do have the ability to take the
address of a variable; I don't know whether there's such a feature
in the latest standard.

But I'm reasonably sure Pascal lets you allocate a pointer, create
a copy of it, and deallocate the original, resulting in a dangling
pointer value -- and I don't know of a standard way to detect this.
I think that makes Pascal "fatally flawed" by Richard's definition.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

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


#10480

FromMalcolm McLean <malcolm.mclean5@btinternet.com>
Date2011-09-18 23:52 -0700
Message-ID<9d349304-bc89-4243-b0ba-3566c4657570@t3g2000vbe.googlegroups.com>
In reply to#10454
On Sep 19, 2:21 am, c...@tiac.net (Richard Harter) wrote:
>
> Any language in which it is possible for a pointer to be invalid but
> which provides no way to test for validity is fundamentally flawed.
>
That's the problem with pointers, of course.

What you really mean is "too low level" rather than "fundamentally
flawed". At some point you've got to write to raw addresses. C allows
you to pass these around, and makes it difficult to tag them with
range and type information, either at the level of the compiler or in
client code. That's the feature that makes C what it is. If you move
to C++ you can use controlled sequences, and essentially eliminate
pointers. But experience shows that this brings its own problems.
--
Fuzzy logic trees, now in Apple ebooks
http://www.malcolmmclean.site11.com/www

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


#10593

FromRui Maciel <rui.maciel@gmail.com>
Date2011-09-20 20:45 +0100
Message-ID<4e78ed72$0$24704$a729d347@news.telepac.pt>
In reply to#10454
Richard Harter wrote:

> Any language in which it is possible for a pointer to be invalid but
> which provides no way to test for validity is fundamentally flawed.

That's like saying that bicycles are fundamentally flawed because they don't 
stop those who ride them from falling.  Meanwhile, you ignore the fact that 
those who adequately trained and practiced riding a bicycle tend to go on 
with their lives without tasting pavement.


Rui Maciel

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


#10610

FromAugust Karlstrom <fusionfile@gmail.com>
Date2011-09-20 23:35 +0200
Message-ID<j5b0vo$5qd$1@dont-email.me>
In reply to#10593
On 2011-09-20 21:45, Rui Maciel wrote:
> Richard Harter wrote:
>
>> Any language in which it is possible for a pointer to be invalid but
>> which provides no way to test for validity is fundamentally flawed.
>
> That's like saying that bicycles are fundamentally flawed because they don't
> stop those who ride them from falling.  Meanwhile, you ignore the fact that
> those who adequately trained and practiced riding a bicycle tend to go on
> with their lives without tasting pavement.

With the bicycle analogy, trying to dereference a null pointer is like 
getting stopped by the police whereas dereferencing a dangling pointer 
is more like running into a china shop with malfunctioning breaks.


August

-- 
The competent programmer is fully aware of the limited size of his own 
skull. He therefore approaches his task with full humility, and avoids 
clever tricks like the plague. --Edsger Dijkstra

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


#10668

FromRui Maciel <rui.maciel@gmail.com>
Date2011-09-21 19:53 +0100
Message-ID<4e7a32b1$0$24705$a729d347@news.telepac.pt>
In reply to#10610
August Karlstrom wrote:

> With the bicycle analogy, trying to dereference a null pointer is like
> getting stopped by the police whereas dereferencing a dangling pointer
> is more like running into a china shop with malfunctioning breaks.

Not quite.  C's "bicycle breaks" do work quite well.  The only issue is that 
the person riding the bicycle must know how to use them.  If he is so bad at 
it that he runs into the figurative china shop then he can only complain 
about himself and his lack of skills.  

As it is often said, a bad workman always blames his tools.


Rui Maciel

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


#10414

From"BartC" <bc@freeuk.com>
Date2011-09-17 23:54 +0100
Message-ID<j538gk$mgf$1@dont-email.me>
In reply to#10412

"jacob navia" <jacob@spamsink.net> wrote in message 
news:j5370i$1nv$1@speranza.aioe.org...
> In a recent discussion about preconditions, I argued that testing ALL 
> preconditions would be unpractical. As an example of a precondition
> impossible to test I presented the problem to know if a pointer
> points to a really readable place in memory.
>
> The windows API provides the function
> bool IsBadReadPtr(const void *lp, size_t ucb);
>
> This takes a pointer and a size and returns true if it is OK, zero
> if it fails.

Even if the pointer is OK, how does it know it points to the right place?

(BTW the MSDN specs say: "Despite its name, it does not guarantee that the 
pointer is valid or that the memory pointed to is safe to use.")

-- 
Bartc 

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


#10416

Fromjacob navia <jacob@spamsink.net>
Date2011-09-18 00:59 +0200
Message-ID<j538or$6ae$2@speranza.aioe.org>
In reply to#10414
Le 18/09/11 00:54, BartC a écrit :
>
>
> "jacob navia" <jacob@spamsink.net> wrote in message
> news:j5370i$1nv$1@speranza.aioe.org...
>> In a recent discussion about preconditions, I argued that testing ALL
>> preconditions would be unpractical. As an example of a precondition
>> impossible to test I presented the problem to know if a pointer
>> points to a really readable place in memory.
>>
>> The windows API provides the function
>> bool IsBadReadPtr(const void *lp, size_t ucb);
>>
>> This takes a pointer and a size and returns true if it is OK, zero
>> if it fails.
>
> Even if the pointer is OK, how does it know it points to the right place?
>

Well, that is the second part. You just put a "magic number" in your
structure.

Without this function, trying to access the magic number could trap
Now you can read it safely after you verified that the pointer is readable.


> (BTW the MSDN specs say: "Despite its name, it does not guarantee that
> the pointer is valid or that the memory pointed to is safe to use.")
>
Of course, how could it do that?

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


#10417

FromHeikki Kallasjoki <fis+usenet@zem.fi>
Date2011-09-17 23:35 +0000
Message-ID<slrnj7abmk.men.fis@iris.zem.fi>
In reply to#10412
On 2011-09-17, jacob navia <jacob@spamsink.net> wrote:
> The windows API provides the function
> bool IsBadReadPtr(const void *lp, size_t ucb);
>
> This takes a pointer and a size and returns true if it is OK, zero
> if it fails.
>
> Problem is, that is only present under windows.
>
> But after doing some research, I found the following equivalent,
> written in almost standard C.

[snip code calling longjmp() from a signal handler]

> Does anybody see any potentially non-standard stuff here?

The act of calling longjmp() from within a signal handler, while
possible in many circumstances/systems, is not quite completely
standard.  The following page summarizes the state:

http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1318.htm

In particular, C89 has some verbiage to allow it (in certain cases),
which has been removed from C99; and even a C90 defect report response
qualifies that it is required to work only for signal handlers invoked
by raise() or abort().  It does not seem to appear on the lists of
signal-handler-safe functions in any standard.

-- 
Heikki Kallasjoki

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


#10418

Fromjacob navia <jacob@spamsink.net>
Date2011-09-18 01:47 +0200
Message-ID<j53bj9$duh$1@speranza.aioe.org>
In reply to#10417
Le 18/09/11 01:35, Heikki Kallasjoki a écrit :
> On 2011-09-17, jacob navia<jacob@spamsink.net>  wrote:
>> The windows API provides the function
>> bool IsBadReadPtr(const void *lp, size_t ucb);
>>
>> This takes a pointer and a size and returns true if it is OK, zero
>> if it fails.
>>
>> Problem is, that is only present under windows.
>>
>> But after doing some research, I found the following equivalent,
>> written in almost standard C.
>
> [snip code calling longjmp() from a signal handler]
>
>> Does anybody see any potentially non-standard stuff here?
>
> The act of calling longjmp() from within a signal handler, while
> possible in many circumstances/systems, is not quite completely
> standard.  The following page summarizes the state:
>
> http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1318.htm
>
> In particular, C89 has some verbiage to allow it (in certain cases),
> which has been removed from C99; and even a C90 defect report response
> qualifies that it is required to work only for signal handlers invoked
> by raise() or abort().  It does not seem to appear on the lists of
> signal-handler-safe functions in any standard.
>

Yes, I see. Maybe a better approach would be to just read the
virtual memory information directly. Under windows it is easy by
querying the memory information API  with VirtualQueryEx and
using that info. But then this is completely system specific and
I do not know the linux equivalent.

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


#10419

FromGeoff <geoff@invalid.invalid>
Date2011-09-17 17:15 -0700
Message-ID<rnda77ls4iofihpuo6k03qtmkbijlkqqfd@4ax.com>
In reply to#10412
On Sun, 18 Sep 2011 00:29:38 +0200, jacob navia <jacob@spamsink.net>
wrote:

>In a recent discussion about preconditions, I argued that testing ALL 
>preconditions would be unpractical. As an example of a precondition
>impossible to test I presented the problem to know if a pointer
>points to a really readable place in memory.
>
>The windows API provides the function
>bool IsBadReadPtr(const void *lp, size_t ucb);
>
>This takes a pointer and a size and returns true if it is OK, zero
>if it fails.
>
>Problem is, that is only present under windows.
>

Second problem is it's not recommended:

http://msdn.microsoft.com/en-us/library/aa366713(v=VS.85).aspx

"Important  This function is obsolete and should not be used. Despite
its name, it does not guarantee that the pointer is valid or that the
memory pointed to is safe to use. For more information, see Remarks on
this page."

You would be better off using SEH and handling it there.

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


#10429

FromМаксим Фомин <maxim@maxim-fomin.ru>
Date2011-09-18 00:43 -0700
Message-ID<2ea618c1-f438-4f2c-a0cf-4591396832ef@n40g2000yqb.googlegroups.com>
In reply to#10412
On Sep 18, 2:29 am, jacob navia <ja...@spamsink.net> wrote:
> In a recent discussion about preconditions, I argued that testing ALL
> preconditions would be unpractical. As an example of a precondition
> impossible to test I presented the problem to know if a pointer
> points to a really readable place in memory.
>
> The windows API provides the function
> bool IsBadReadPtr(const void *lp, size_t ucb);
>
> This takes a pointer and a size and returns true if it is OK, zero
> if it fails.
>
> Problem is, that is only present under windows.
>
> But after doing some research, I found the following equivalent,
> written in almost standard C.
> ---------------------------------------------------------cut here
> /* Heavily adapted from:
>    http://fixunix.com/linux/337646-isbadreadptr-linux.html*/
> #include <setjmp.h>
> #include <signal.h>
> static int PtrTestInstalled;
> static jmp_buf PtrTestJmpBuf;
> static void PtrTestHandler(int nSig)
> {
>          if (PtrTestInstalled)
>                  longjmp(PtrTestJmpBuf, 1);
>
> }
>
> int IsBadReadPtr(void* lp, size_t ObjectSize)
> {
>          size_t i;
>          volatile unsigned char c;
>          int r  = 1;
>          void (* PrevHandler)(int);
>          PtrTestInstalled = 1;
>          if (setjmp(PtrTestJmpBuf)) {
>                  r = 0;
>                  goto Ret;
>          }
>          PrevHandler = signal(SIGSEGV, PtrTestHandler);
>
>          for (i = 0; i < ObjectSize; i ++)
>                  c = ((unsigned char*)lp)[i];
> Ret:
>          PtrTestInstalled        = 0;
>          signal(SIGSEGV, PrevHandler);
>
>          return r;}
>
> --------------------------------------------------------cut here
>
> This looks like a promising stuff. The only non-standard
> thing here is the SIGSEGV constant. That constant is not
> in the standard but defined under windows, linux, and
> most  Unix variants.
> Does anybody see any potentially non-standard stuff here?
>
> Thanks

I was thinking about this problem (and found several examples with
setjmp)
and my conclusion was that creating malloc wrapper function,
(which can validate pointers only to dynamic memory) is best and
portable option.
IMHO this problem araises when callee function uses memory allocated
by caller function
and may be the right approach is to fix the caller function.

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


#10433

From"Rosario Pulvirenti" <NoInUseno1Spam@non.usare.invalid>
Date2011-09-18 10:34 +0200
Message-ID<4e75ac80$0$15668$4fafbaef@reader2.news.tin.it>
In reply to#10412
"jacob navia" <jacob@spamsink.net> ha scritto nel messaggio
news:j5370i$1nv$1@speranza.aioe.org...
> In a recent discussion about preconditions, I argued that testing ALL
> preconditions would be unpractical. As an example of a precondition
> impossible to test I presented the problem to know if a pointer
> points to a really readable place in memory.

i could find [one loop on a list of all pointer released from myMalloc()
function and a couple of subtration] if a pointer point to some
MyMalloc area
if the stack memory is implementd trught myMalloc is possible to see
if one pointer point valid memory something about
O(numberPonters) [linear time]

but i can think on that we want O(1)
so something using hash function


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


Page 14 of 15 — ← Prev page 1 … 12 13 [14] 15  Next page →

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


csiph-web