Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #10412 > unrolled thread
| Started by | jacob navia <jacob@spamsink.net> |
|---|---|
| First post | 2011-09-18 00:29 +0200 |
| Last post | 2011-09-20 00:22 -0700 |
| Articles | 20 on this page of 284 — 42 participants |
Back to article view | Back to comp.lang.c
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 12 of 15 — ← Prev page 1 … 10 11 [12] 13 14 15 Next page →
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2011-09-21 14:35 -0700 |
| Message-ID | <lnd3et4lzt.fsf@nuthaus.mib.org> |
| In reply to | #10682 |
August Karlstrom <fusionfile@gmail.com> writes:
> On 2011-09-21 02:19, Keith Thompson wrote:
>> August Karlstrom<fusionfile@gmail.com> writes:
>>> Could you describe the semantics of scope and and lifetimes of variables
>>> in such a language or do you know of an actual language where the above
>>> code would make sense?
> [...]
>> sub func2 {
>> my $local2 = 43;
>> return \$local2;
>> }
> [...]
>> func2 declares a local variable and initializes it to 43, but it
>> returns a *reference* to it. The variable itself continues to exist
>> as long as the reference exists, even though the function in which
>> it was lexically declared has returned.
>
> OK, strange, but then $local2 cannot be a usual local (lexical) variable
> put on the usual call stack. There must be something else going on in
> the background.
It's exactly the same kind of local variable as $local1 in my
other example. It behaves differently because there's an active
reference to it. That's how Perl works (and probably a lot of
other dynamic languages).
--
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]
| From | August Karlstrom <fusionfile@gmail.com> |
|---|---|
| Date | 2011-09-22 00:09 +0200 |
| Message-ID | <j5dnae$alo$1@dont-email.me> |
| In reply to | #10683 |
On 2011-09-21 23:35, Keith Thompson wrote: > It's exactly the same kind of local variable as $local1 in my > other example. It behaves differently because there's an active > reference to it. That's how Perl works (and probably a lot of > other dynamic languages). Perl usually works like no other language... 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]
| From | James Kuyper <jameskuyper@verizon.net> |
|---|---|
| Date | 2011-09-21 19:08 -0400 |
| Message-ID | <4E7A6E6C.8020804@verizon.net> |
| In reply to | #10684 |
On 09/21/2011 06:09 PM, August Karlstrom wrote: > On 2011-09-21 23:35, Keith Thompson wrote: >> It's exactly the same kind of local variable as $local1 in my >> other example. It behaves differently because there's an active >> reference to it. That's how Perl works (and probably a lot of >> other dynamic languages). > > Perl usually works like no other language... Not in this case.
[toc] | [prev] | [next] | [standalone]
| From | cri@tiac.net (Richard Harter) |
|---|---|
| Date | 2011-09-21 05:25 +0000 |
| Message-ID | <4e796d4f.2537847454@text.giganews.com> |
| In reply to | #10587 |
On Tue, 20 Sep 2011 20:32:17 +0200, August Karlstrom
<fusionfile@gmail.com> wrote:
>On 2011-09-20 19:00, Willem wrote:
>> August Karlstrom wrote:
>> ) A language with an "address of" operator cannot be safe as is
>> ) illustrated by the following example:
>> )
>> ) T *x;
>> )
>> ) void f(void)
>> ) {
>> ) T y;
>> )
>> ) x =&y;
>> ) }
>> )
>> ) After calling f, x is invalid.
>>
>> Or not. Depending on the language. Which was the point. Duh.
>
>Could you describe the semantics of scope and and lifetimes of variables
>in such a language or do you know of an actual language where the above
>code would make sense?
>
>
You need to learn more about other programming languages than C. Wrap
your mind around closures, which are omni-present in functional
languages, lisp based language, and many modern scripting languages.
In such languages that sort of thing is easy.
People who are used to C semantics assume that everything local to a
function is on the stack and disappears when the function returns.
That is convenient and efficient which is why C is popular for system
code.
How is code like your example handled? In many languages everything
comes from garbage collected storage; a storage object continues to
exist as long as there are references to it. Pointers never dangle.
That's the simplest way, but it isn't the only way.
[toc] | [prev] | [next] | [standalone]
| From | Rui Maciel <rui.maciel@gmail.com> |
|---|---|
| Date | 2011-09-20 21:11 +0100 |
| Message-ID | <4e78f388$0$24712$a729d347@news.telepac.pt> |
| In reply to | #10579 |
August Karlstrom wrote:
> A language with an "address of" operator cannot be safe as is
> illustrated by the following example:
>
> T *x;
>
> void f(void)
> {
> T y;
>
> x = &y;
> }
>
> After calling f, x is invalid.
If the language specification clearly states that y's lifetime ends when f()
finishes executing then referring to that object before or after f() is
executed represents bad code which is a sign of incompetence, not an
indication that the language is unsafe.
Rui Maciel
[toc] | [prev] | [next] | [standalone]
| From | August Karlstrom <fusionfile@gmail.com> |
|---|---|
| Date | 2011-09-20 23:01 +0200 |
| Message-ID | <j5auuu$nhb$1@dont-email.me> |
| In reply to | #10595 |
On 2011-09-20 22:11, Rui Maciel wrote:
> August Karlstrom wrote:
>> T *x;
>>
>> void f(void)
>> {
>> T y;
>>
>> x =&y;
>> }
>>
>> After calling f, x is invalid.
>
> If the language specification clearly states that y's lifetime ends when f()
> finishes executing then referring to that object before or after f() is
> executed represents bad code which is a sign of incompetence, not an
> indication that the language is unsafe.
To me dangling pointers represent the very definition of unsafeness.
What is an unsafe language to you?
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]
| From | Malcolm McLean <malcolm.mclean5@btinternet.com> |
|---|---|
| Date | 2011-09-21 03:11 -0700 |
| Message-ID | <24a74184-0ff6-4e16-90d2-26d83f481532@c22g2000yqa.googlegroups.com> |
| In reply to | #10606 |
On Sep 21, 12:01 am, August Karlstrom <fusionf...@gmail.com> wrote:
>
> To me dangling pointers represent the very definition of unsafeness.
> What is an unsafe language to you?
>
>
This is even less safe
x = fooinanunsafelangage(y)
{
if(y = 'hahahaha')
return 'got you';
else
return 42;
}
Once you can't be sure what type you're going to be passed back,
testing gets very difficult. The connection with safe pointers is
that, to implement a safe pointer, many languages tag the pointer with
type information. That makes it very tempting to allow functions to
return arbitrary types, which leads to fooinanunsafelanguage.
--
Visit my website
http://www.malcolmmclean.site11.com/www
[toc] | [prev] | [next] | [standalone]
| From | jacob navia <jacob@spamsink.net> |
|---|---|
| Date | 2011-09-21 12:16 +0200 |
| Message-ID | <j5cdin$c22$1@speranza.aioe.org> |
| In reply to | #10634 |
Le 21/09/11 12:11, Malcolm McLean a écrit :
> On Sep 21, 12:01 am, August Karlstrom<fusionf...@gmail.com> wrote:
>>
>> To me dangling pointers represent the very definition of unsafeness.
>> What is an unsafe language to you?
>>
>>
> This is even less safe
>
> x = fooinanunsafelangage(y)
> {
> if(y = 'hahahaha')
> return 'got you';
> else
> return 42;
> }
>
> Once you can't be sure what type you're going to be passed back,
> testing gets very difficult. The connection with safe pointers is
> that, to implement a safe pointer, many languages tag the pointer with
> type information. That makes it very tempting to allow functions to
> return arbitrary types, which leads to fooinanunsafelanguage.
> --
> Visit my website
> http://www.malcolmmclean.site11.com/www
Yes, but there is even worst: making operations like "+" overloaded
so that "1" + "2" --> "12"
:-)
[toc] | [prev] | [next] | [standalone]
| From | Malcolm McLean <malcolm.mclean5@btinternet.com> |
|---|---|
| Date | 2011-09-21 03:23 -0700 |
| Message-ID | <8019831a-efe0-43f0-8594-d3340fc6fb10@fe21g2000vbb.googlegroups.com> |
| In reply to | #10635 |
On Sep 21, 1:16 pm, jacob navia <ja...@spamsink.net> wrote:
> Le 21/09/11 12:11, Malcolm McLean a crit :
>
>
>
>
>
>
>
>
>
> > On Sep 21, 12:01 am, August Karlstrom<fusionf...@gmail.com> wrote:
>
> >> To me dangling pointers represent the very definition of unsafeness.
> >> What is an unsafe language to you?
>
> > This is even less safe
>
> > x = fooinanunsafelangage(y)
> > {
> > if(y = 'hahahaha')
> > return 'got you';
> > else
> > return 42;
> > }
>
> > Once you can't be sure what type you're going to be passed back,
> > testing gets very difficult. The connection with safe pointers is
> > that, to implement a safe pointer, many languages tag the pointer with
> > type information. That makes it very tempting to allow functions to
> > return arbitrary types, which leads to fooinanunsafelanguage.
> > --
> > Visit my website
> >http://www.malcolmmclean.site11.com/www
>
> Yes, but there is even worst: making operations like "+" overloaded
> so that "1" + "2" --> "12"
>
Then they combine.
sequence = "1234567890123456789012345678901234567890123";
tail = sequence + foo(string);
tail equals "3", until string goes to "hahahaha", at which point tail
equals "1234567890123456789012345678901234567890123got you".
[toc] | [prev] | [next] | [standalone]
| From | Rui Maciel <rui.maciel@gmail.com> |
|---|---|
| Date | 2011-09-21 20:44 +0100 |
| Message-ID | <4e7a3e84$0$24707$a729d347@news.telepac.pt> |
| In reply to | #10606 |
August Karlstrom wrote: > To me dangling pointers represent the very definition of unsafeness. > What is an unsafe language to you? The example you provided represented poorly written code where a pointer refers to an object after it's lifetime as ended. Understanding an object's storage duration is very basic stuff. Therefore, this code goes against extremely basic concepts which are clearly defined and therefore can only be written by incompetent programmers. A programming language cannot be deemed safe or unsafe due to mistakes made by incompetent programmers. If that was the case then even the most basic scripting language could be accused of being unsafe if a fool could inadvertently write a script which runs any acceptable but obviously unwanted command, such as rm -rf /*, and this isn't true. Rui Maciel
[toc] | [prev] | [next] | [standalone]
| From | August Karlstrom <fusionfile@gmail.com> |
|---|---|
| Date | 2011-09-21 22:53 +0200 |
| Message-ID | <j5dit2$btk$1@dont-email.me> |
| In reply to | #10676 |
On 2011-09-21 21:44, Rui Maciel wrote: > August Karlstrom wrote: > >> To me dangling pointers represent the very definition of unsafeness. >> What is an unsafe language to you? > > The example you provided represented poorly written code where a pointer > refers to an object after it's lifetime as ended. Indeed, but my main point was to illustrate that the address-of operator can lead to a type of undefined behavior that a safe language would not allow. As I mentioned in a recent post, by a safe language I mean a language that (at least) prevent invalid memory accesses. > A programming language cannot be deemed > safe or unsafe due to mistakes made by incompetent programmers. Of course not, the word "safe" rather refers to type safety and memory safety. 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]
| From | James Kuyper <jameskuyper@verizon.net> |
|---|---|
| Date | 2011-09-21 23:08 -0400 |
| Message-ID | <j5e8s8$bqh$1@dont-email.me> |
| In reply to | #10680 |
On 09/21/2011 04:53 PM, August Karlstrom wrote: ... > Indeed, but my main point was to illustrate that the address-of operator > can lead to a type of undefined behavior that a safe language would not > allow. But the problem you're trying to illustrate occurs only if the lifetime of the object referred to ends before the reference to it created by that operator is discarded. That can quite easily happen in C. However, in languages with a quite different underlying architecture, the object is guaranteed to continue existing as long as any reference to it continues to exist. -- James Kuyper
[toc] | [prev] | [next] | [standalone]
| From | Malcolm McLean <malcolm.mclean5@btinternet.com> |
|---|---|
| Date | 2011-09-21 21:14 -0700 |
| Message-ID | <9c572a1e-1f67-4019-85e5-613813f14ea9@z5g2000yqf.googlegroups.com> |
| In reply to | #10686 |
On Sep 22, 6:08 am, James Kuyper <jameskuy...@verizon.net> wrote: > > But the problem you're trying to illustrate occurs only if the lifetime > of the object referred to ends before the reference to it created by > that operator is discarded. That can quite easily happen in C. However, > in languages with a quite different underlying architecture, the object > is guaranteed to continue existing as long as any reference to it > continues to exist. > But it's impossible to guarantee that it means something. I've a list of space invaders. When the player shoots one, the space invader is deleted and removed from the list. I also have a list of "spawning" space invaders. Due to a logical error, I don't update this list when a space invader is zapped. Therefore a supposedly zapped invader still spawns. In C, the pointer would point to a freed area of memory, and the result would most likely be a crash. In a garbage collection language, the invader would still be there, so the code would most likely spawn a new invader in a blank area of screen. In this case, the behaviour of the garbage collection code is probably better, but both are erroneous.
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@verizon.net> |
|---|---|
| Date | 2011-09-22 07:17 -0400 |
| Message-ID | <j5f5g5$skf$1@dont-email.me> |
| In reply to | #10687 |
On 09/22/2011 12:14 AM, Malcolm McLean wrote: > On Sep 22, 6:08�am, James Kuyper <jameskuy...@verizon.net> wrote: >> >> But the problem you're trying to illustrate occurs only if the lifetime >> of the object referred to ends before the reference to it created by >> that operator is discarded. That can quite easily happen in C. However, >> in languages with a quite different underlying architecture, the object >> is guaranteed to continue existing as long as any reference to it >> continues to exist. >> > But it's impossible to guarantee that it means something. > > I've a list of space invaders. When the player shoots one, the space > invader is deleted and removed from the list. I also have a list of > "spawning" space invaders. Due to a logical error, I don't update this > list when a space invader is zapped. Therefore a supposedly zapped > invader still spawns. In C, the pointer would point to a freed area of > memory, and the result would most likely be a crash. In a garbage > collection language, the invader would still be there, so the code > would most likely spawn a new invader in a blank area of screen. In > this case, the behaviour of the garbage collection code is probably > better, but both are erroneous. I don't claim that garbage collection solves all problems. I'm not actually a fan of the technology - I prefer more deterministic control of memory allocation. However, I understand the attractions of gc. The best that any programming language can do is tell you that there's internal inconsistencies in what you told the computer to do; none can save you from the problems that occur when what you told it to do is completely internally consistent, but different from what you wanted to do. At least, not until mind-reading technology has been developed. :-) -- James Kuyper
[toc] | [prev] | [next] | [standalone]
| From | Rui Maciel <rui.maciel@gmail.com> |
|---|---|
| Date | 2011-09-22 16:37 +0100 |
| Message-ID | <4e7b5646$0$16760$a729d347@news.telepac.pt> |
| In reply to | #10686 |
James Kuyper wrote: > But the problem you're trying to illustrate occurs only if the lifetime > of the object referred to ends before the reference to it created by > that operator is discarded. That can quite easily happen in C. However, > in languages with a quite different underlying architecture, the object > is guaranteed to continue existing as long as any reference to it > continues to exist. Just to nitpick, the C standard grants compiler developers the ability to guarantee just that; that an object continues to exist as long as there is a reference to it. This is why the C standard specifies the lifetime of an object as the minimum portion of the program where an object's storage is guaranteed to exist, why referring to the object outside of it's lifetime is left undefined, and why the C standard explicitly imposes no requirements on what value should be stored by any a pointer that points to such an object. Granted, code which took advantage of this wouldn't be portable, but it would be valid C code nonetheless. Rui Maciel
[toc] | [prev] | [next] | [standalone]
| From | Rui Maciel <rui.maciel@gmail.com> |
|---|---|
| Date | 2011-09-22 16:25 +0100 |
| Message-ID | <4e7b5386$0$16751$a729d347@news.telepac.pt> |
| In reply to | #10680 |
August Karlstrom wrote: > On 2011-09-21 21:44, Rui Maciel wrote: >> August Karlstrom wrote: >> >>> To me dangling pointers represent the very definition of unsafeness. >>> What is an unsafe language to you? >> >> The example you provided represented poorly written code where a pointer >> refers to an object after it's lifetime as ended. > > Indeed, but my main point was to illustrate that the address-of operator > can lead to a type of undefined behavior that a safe language would not > allow. As I mentioned in a recent post, by a safe language I mean a > language that (at least) prevent invalid memory accesses. And what leads you to believe that referring to an object past its lifetime, as defined in the C standard, represents an invalid memory access? This is behaviour which was intentionally left undefined in the standard. This means that C compiler writers are free to choose how to implement their memory management policy as they see fit, which includes explicitly defining other limits for an object's lifetime. With this, programmers may opt to strictly follow the behaviour as defined in the C standard, or they may opt to write non-portable code which takes advantage of the behaviour which has been defined in a particular platform. Trying to access objects beyond their lifetime only poses a problem if a programmer makes the mistake of explicitly relying on behaviour which is neither defined in the standard nor is supported by the adopted platform. This is not a problem affecting the C programming language. It's a problem caused by a clueless programmer writing broken code. Consequently, the address-of operator clearly doesn't represent a safety risk: only the programmer does, and only if he doesn't know what he is doing. It may be argued that the compiler failing to produce a diagnostic message also contributes to the problem, but this doesn't change the problem's underlying cause. >> A programming language cannot be deemed >> safe or unsafe due to mistakes made by incompetent programmers. > > Of course not, the word "safe" rather refers to type safety and memory > safety. If type safety and memory safety is only considered to be at risk due to a programmer's inability to write valid code which goes against the language definition then the point is still the same: a programming language cannot be deemed safe or unsafe due to mistakes made by incompetent programmers. Rui Maciel
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2011-09-22 11:36 -0700 |
| Message-ID | <lnzkhw2zmz.fsf@nuthaus.mib.org> |
| In reply to | #10710 |
Rui Maciel <rui.maciel@gmail.com> writes:
[...]
> If type safety and memory safety is only considered to be at risk due to a
> programmer's inability to write valid code which goes against the language
> definition then the point is still the same: a programming language cannot
> be deemed safe or unsafe due to mistakes made by incompetent programmers.
What about mistakes made by *competent* programmers?
--
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]
| From | Rui Maciel <rui.maciel@gmail.com> |
|---|---|
| Date | 2011-09-24 13:37 +0100 |
| Message-ID | <4e7dceef$0$16759$a729d347@news.telepac.pt> |
| In reply to | #10717 |
Keith Thompson wrote: > Rui Maciel <rui.maciel@gmail.com> writes: > [...] >> If type safety and memory safety is only considered to be at risk due to >> a programmer's inability to write valid code which goes against the >> language definition then the point is still the same: a programming >> language cannot be deemed safe or unsafe due to mistakes made by >> incompetent programmers. > > What about mistakes made by *competent* programmers? I don't believe that a competent programmer believes it is reasonable to try to access a local object beyond its lifetime, something which at least some compilers warn about. As this was the example which was presented to demonstrate that the C programming language is unsafe then, at least in this case, this misconception can be put to rest. Rui Maciel
[toc] | [prev] | [next] | [standalone]
| From | cri@tiac.net (Richard Harter) |
|---|---|
| Date | 2011-09-24 13:50 +0000 |
| Message-ID | <4e7ddafa.151813121@text.giganews.com> |
| In reply to | #10853 |
On Sat, 24 Sep 2011 13:37:03 +0100, Rui Maciel <rui.maciel@gmail.com>
wrote:
>Keith Thompson wrote:
>
>> Rui Maciel <rui.maciel@gmail.com> writes:
>> [...]
>>> If type safety and memory safety is only considered to be at risk due to
>>> a programmer's inability to write valid code which goes against the
>>> language definition then the point is still the same: a programming
>>> language cannot be deemed safe or unsafe due to mistakes made by
>>> incompetent programmers.
>>
>> What about mistakes made by *competent* programmers?
>
>I don't believe that a competent programmer believes it is reasonable to try
>to access a local object beyond its lifetime, something which at least some
>compilers warn about. As this was the example which was presented to
>demonstrate that the C programming language is unsafe then, at least in this
>case, this misconception can be put to rest.
You misapprehend. The example was not about the C language in
particular; it was about whether languages that have an address of
operator make it possible to access an object beyond its lifetime. I
quote:
A language with an "address of" operator cannot be safe as is
illustrated by the following example:
T *x;
void f(void)
{
T y;
x = &y;
}
After calling f, x is invalid.
Note the "A language". This was a general proposition about languages
that happens to be false. The error is the assumption that all
languages bind lexical scope to storage object lifetime.
Beyond that, I opine that you do not understand what it means to say
something is safe. Just because a language (or any tool for that
matter) is unsafe doesn't mean that it cannot be used safely by a
skilled and careful programmer. It means that the language permits
uncaught errors. Even "competent" programmers make mistakes - no one
says that competent programmers intend to do things like returning out
of scope pointers. C is unsafe in this regard because it can happen.
There is nothing wrong with that - most people understand that C was
never meant to be a safe language.
[toc] | [prev] | [next] | [standalone]
| From | gazelle@shell.xmission.com (Kenny McCormack) |
|---|---|
| Date | 2011-09-24 14:47 +0000 |
| Message-ID | <j5kqio$q4u$1@news.xmission.com> |
| In reply to | #10860 |
In article <4e7ddafa.151813121@text.giganews.com>, Richard Harter <cri@tiac.net> wrote: ... >Beyond that, I opine that you do not understand what it means to say >something is safe. Just because a language (or any tool for that >matter) is unsafe doesn't mean that it cannot be used safely by a >skilled and careful programmer. It means that the language permits >uncaught errors. Even "competent" programmers make mistakes - no one >says that competent programmers intend to do things like returning out >of scope pointers. C is unsafe in this regard because it can happen. > >There is nothing wrong with that - most people understand that C was >never meant to be a safe language. Rui's problem throughout this thread is that he refuses to accept that "unsafe" != "bad". I.e., the rest of us understand that no moral judgement is being made; we are not saying that C is a bad language. But Rui seems obsessed with defending C's honor against the claim of unsafeness; no such defense is warranted or necessary. Another way to look at this is that if you find me & Kiki arguing the same side of a C question/issue, you can probably be certain that that position (the one Kiki & I are arguing for) is correct. -- Windows 95 n. (Win-doze): A 32 bit extension to a 16 bit user interface for an 8 bit operating system based on a 4 bit architecture from a 2 bit company that can't stand 1 bit of competition. Modern day upgrade --> Windows XP Professional x64: Windows is now a 64 bit tweak of a 32 bit extension to a 16 bit user interface for an 8 bit operating system based on a 4 bit architecture from a 2 bit company that can't stand 1 bit of competition.
[toc] | [prev] | [next] | [standalone]
Page 12 of 15 — ← Prev page 1 … 10 11 [12] 13 14 15 Next page →
Back to top | Article view | comp.lang.c
csiph-web