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


Groups > comp.lang.forth > #43083

Re: New to the group

From "Rod Pemberton" <too@zxcvfeqad.cdm>
Newsgroups comp.lang.forth
Subject Re: New to the group
Date 2015-11-02 02:34 -0500
Organization Aioe.org NNTP Server
Message-ID <op.x7gpzwkqsi10q1@localhost> (permalink)
References (7 earlier) <mumr5m$gti$1@dont-email.me> <f57efe82-35b9-41c5-a8a7-19190c3424d6@googlegroups.com> <877fn4amxg.fsf@jester.gateway.sonic.net> <op.x5wm0zbjyfako5@localhost> <1d793bd7rhaq6vblplj5da2jaukilaire2@4ax.com>

Show all headers | View raw


On Sat, 31 Oct 2015 06:54:26 -0400, David Thompson <dave.thompson2@verizon.net> wrote:
> On Fri, 02 Oct 2015 20:44:49 -0400, "Rod Pemberton"
> <boo@fasdfrewar.cdm> wrote:

>> On Fri, 02 Oct 2015 19:08:27 -0400, Paul Rubin <no.email@nospam.invalid> wrote:
>>
>> > Yes.  Think of a subscript error in a C program.  The C standard says
>> > what happens when a subscript is in range, but says nothing about what's
>> > supposed to happen when it's out of range.  Traditionally in C, that's
>> > an unsafe operation and anything can happen.
>>
>> (nitpick ...)
>>
>> It defines access one past the end of certain arrays as valid,
>> e.g., to detect nul '\0' at the end of string.  But, yes, in
>> general, access outside the scope of valid C objects is
>> undefined or implementation defined.
>>
> People often treat the \0 as "after" the string, although the C
> standards define the term string to include the (first) \0 and then
> repeatedly talk about strings, characters, and character sequences
> "including the terminating null" or "not including ...".
>

s/null/nul/

NUL is a character for ASCII and EBCDIC.  C redefines the NUL character
to be as large as the size of the C byte which can be larger in bits
than the size of a C character.  This was to allow for finding 16-bit
NULs quickly on word sized machines when the character size is 8-bits
or 9-bits, etc.

> However, everyone agrees the \0 is in the *array* that the string is
> stored in.  [...]

Yes.

It's referred to as "after" the string because of the declared length
of the string does not include the NUL character.

> C also allows calculating the address of, but *not* accessing, the
> fictional element that would be just after the array &a[n] or a+n .

I know of no bounds checks or range checks for C that would prohibit
accessing anything at any address.  Accessing anything outside the
scope of a valid C object is "undefined behavior" or implementation
defined behavior, such as for a pointer to a memory mapped device.
In fact, the ability to access just prior to an "array" or just after
the end of an array is used by malloc() on many implementations since
malloc() typically creates a header struct just prior to the allocated
memory.

> This means (on most implementations) an array can't be allocated
> exactly at the end of the address space, or the end of a segment when
> real segments are used, which the compiler can usually avoid easily.

Here, I think you may be refering to a C object larger than a C byte
in size crossing a segment boundary, perhaps causing a access violation
such as a page fault, etc.  This has nothing to do with C, but entirely
with the platform.


Rod Pemberton


-- 
When El Chapo is the most beloved man in Mexico and Trump is the most hated,
it shows that Mexico is truly fouled up.

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

New to the group Chris Curl <ccurl609@gmail.com> - 2015-09-26 15:17 -0700
  Re: New to the group mentificium@gmail.com - 2015-09-26 17:35 -0700
  Re: New to the group hughaguilar96@gmail.com - 2015-09-26 21:16 -0700
    Re: New to the group Chris Curl <ccurl609@gmail.com> - 2015-09-27 07:27 -0700
      Re: New to the group rickman <gnuarm@gmail.com> - 2015-09-27 14:43 -0400
        Re: New to the group Chris Curl <ccurl609@gmail.com> - 2015-09-27 13:05 -0700
        Re: New to the group "Elizabeth D. Rather" <erather@forth.com> - 2015-09-27 12:57 -1000
        Re: New to the group Paul Rubin <no.email@nospam.invalid> - 2015-09-27 17:00 -0700
          Re: New to the group hughaguilar96@gmail.com - 2015-09-27 17:16 -0700
            Re: New to the group rickman <gnuarm@gmail.com> - 2015-09-27 20:31 -0400
            Re: New to the group jfong@ms4.hinet.net - 2015-09-27 18:57 -0700
              Re: New to the group hughaguilar96@gmail.com - 2015-09-27 19:37 -0700
                Re: New to the group Chris Curl <ccurl609@gmail.com> - 2015-09-27 20:53 -0700
                Re: New to the group "Elizabeth D. Rather" <erather@forth.com> - 2015-09-27 19:02 -1000
                Re: New to the group hughaguilar96@gmail.com - 2015-09-27 23:33 -0700
                Re: New to the group Chris Curl <ccurl609@gmail.com> - 2015-09-28 04:51 -0700
                Re: New to the group rickman <gnuarm@gmail.com> - 2015-09-28 12:39 -0400
                Re: New to the group Roelf Toxopeus <rt4all@notthis.hetnet.nl> - 2015-09-28 14:29 +0200
                Re: New to the group Chris Curl <ccurl609@gmail.com> - 2015-09-28 07:18 -0700
                Re: New to the group foxaudioresearch@gmail.com - 2015-09-28 08:07 -0700
                Re: New to the group Roelf Toxopeus <rt4all@notthis.hetnet.nl> - 2015-09-28 17:23 +0200
                Re: New to the group Chris Curl <ccurl609@gmail.com> - 2015-09-28 11:16 -0700
                Re: New to the group rickman <gnuarm@gmail.com> - 2015-09-28 14:25 -0400
                Re: New to the group anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-09-29 09:05 +0000
                Re: New to the group Roelf Toxopeus <rt4all@notthis.hetnet.nl> - 2015-09-28 20:31 +0200
                Re: New to the group Chris Curl <ccurl609@gmail.com> - 2015-09-28 13:20 -0700
                Re: New to the group Roelf Toxopeus <rt4all@notthis.hetnet.nl> - 2015-09-28 22:52 +0200
                Re: New to the group Chris Curl <ccurl609@gmail.com> - 2015-09-28 16:40 -0700
                Re: New to the group Alfred Singlestone <vitonis@gmail.com> - 2015-09-28 08:41 -0700
                Re: New to the group "Elizabeth D. Rather" <erather@forth.com> - 2015-09-28 11:41 -1000
                Re: New to the group hughaguilar96@gmail.com - 2015-09-28 21:33 -0700
                Re: New to the group jfong@ms4.hinet.net - 2015-09-28 19:13 -0700
                Re: New to the group rickman <gnuarm@gmail.com> - 2015-09-29 00:51 -0400
                Re: New to the group jfong@ms4.hinet.net - 2015-09-29 18:26 -0700
                Re: New to the group rickman <gnuarm@gmail.com> - 2015-09-29 21:55 -0400
                Re: New to the group Jan Coombs <Jan-54 <jenfhaomndgfwutc@murmic.plus.com>> - 2015-09-30 08:29 +0100
                Re: New to the group jfong@ms4.hinet.net - 2015-09-29 18:52 -0700
                Re: New to the group hughaguilar96@gmail.com - 2015-09-29 00:29 -0700
                Re: New to the group Chris Curl <ccurl609@gmail.com> - 2015-09-29 04:40 -0700
                Re: New to the group Mark Wills <markwills1970@gmail.com> - 2015-09-29 05:24 -0700
                Re: New to the group Chris Curl <ccurl609@gmail.com> - 2015-09-29 07:33 -0700
                Re: New to the group hughaguilar96@gmail.com - 2015-09-29 14:11 -0700
                Re: New to the group "WJ" <w_a_x_man@yahoo.com> - 2015-09-29 16:46 +0000
                Re: New to the group hughaguilar96@gmail.com - 2015-09-29 14:15 -0700
                Re: New to the group rickman <gnuarm@gmail.com> - 2015-09-29 17:34 -0400
                Re: New to the group "WJ" <w_a_x_man@yahoo.com> - 2015-09-30 00:07 +0000
    Re: New to the group Chris Curl <ccurl609@gmail.com> - 2015-09-27 10:54 -0700
  Re: New to the group Paul Rubin <no.email@nospam.invalid> - 2015-09-26 22:37 -0700
    Re: New to the group Chris Curl <ccurl609@gmail.com> - 2015-09-27 10:51 -0700
  Re: New to the group Chris Curl <ccurl609@gmail.com> - 2015-09-29 17:15 -0700
    Re: New to the group rickman <gnuarm@gmail.com> - 2015-09-29 21:58 -0400
      Re: New to the group Chris Curl <ccurl609@gmail.com> - 2015-09-29 22:03 -0700
        Re: New to the group "Elizabeth D. Rather" <erather@forth.com> - 2015-09-29 21:32 -1000
          Re: New to the group Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-09-30 09:06 +0100
            Re: New to the group "Elizabeth D. Rather" <erather@forth.com> - 2015-09-30 08:58 -1000
              Re: New to the group Mark Wills <markwills1970@gmail.com> - 2015-09-30 23:55 -0700
                Re: New to the group "Elizabeth D. Rather" <erather@forth.com> - 2015-09-30 21:28 -1000
                Re: New to the group rickman <gnuarm@gmail.com> - 2015-10-01 08:25 -0400
                Re: New to the group hughaguilar96@gmail.com - 2015-10-01 09:33 -0700
            Re: New to the group hughaguilar96@gmail.com - 2015-09-30 16:21 -0700
              Re: New to the group "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-09-30 21:03 -0400
                Re: New to the group "Elizabeth D. Rather" <erather@forth.com> - 2015-09-30 19:34 -1000
                Re: New to the group hughaguilar96@gmail.com - 2015-09-30 23:47 -0700
                Re: New to the group rickman <gnuarm@gmail.com> - 2015-10-01 08:31 -0400
                Re: New to the group "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-10-02 00:30 -0400
                Re: New to the group "Elizabeth D. Rather" <erather@forth.com> - 2015-10-01 19:22 -1000
                Re: New to the group hughaguilar96@gmail.com - 2015-10-01 23:52 -0700
                Re: New to the group Mark Wills <markwills1970@gmail.com> - 2015-10-02 01:52 -0700
                Re: New to the group "Elizabeth D. Rather" <erather@forth.com> - 2015-10-02 08:36 -1000
                Re: New to the group rickman <gnuarm@gmail.com> - 2015-10-02 17:00 -0400
                Re: New to the group Chris Curl <ccurl609@gmail.com> - 2015-10-02 14:46 -0700
                Re: New to the group rickman <gnuarm@gmail.com> - 2015-10-02 18:10 -0400
                Re: New to the group Paul Rubin <no.email@nospam.invalid> - 2015-10-02 16:08 -0700
                Re: New to the group "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-10-02 20:44 -0400
                Re: New to the group David Thompson <dave.thompson2@verizon.net> - 2015-10-31 06:54 -0400
                Re: New to the group "Rod Pemberton" <too@zxcvfeqad.cdm> - 2015-11-02 02:34 -0500
                Re: New to the group David Thompson <dave.thompson2@verizon.net> - 2015-12-22 06:45 -0500
                Re: New to the group "Rod Pemberton" <too@zxcvfeqad.cdm> - 2015-11-02 02:34 -0500
                Re: New to the group "Elizabeth D. Rather" <erather@forth.com> - 2015-10-02 15:16 -1000
                Re: New to the group Paul Rubin <no.email@nospam.invalid> - 2015-10-02 18:21 -0700
                Re: New to the group "Elizabeth D. Rather" <erather@forth.com> - 2015-10-02 15:38 -1000
                Re: New to the group rickman <gnuarm@gmail.com> - 2015-10-02 22:13 -0400
                Re: New to the group Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-10-03 22:24 +0100
                Re: New to the group rickman <gnuarm@gmail.com> - 2015-10-03 17:33 -0400
          Re: New to the group hughaguilar96@gmail.com - 2015-09-30 17:00 -0700
            Re: New to the group "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-09-30 20:38 -0400
            Re: New to the group Walter Banks <walter@bytecraft.com> - 2015-10-02 14:37 -0400
              Re: New to the group rickman <gnuarm@gmail.com> - 2015-10-02 17:01 -0400
              Re: New to the group hughaguilar96@gmail.com - 2015-10-02 23:35 -0700
        Re: New to the group "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-09-30 18:11 -0400
          Re: New to the group Coos Haak <chforth@hccnet.nl> - 2015-10-01 02:13 +0200
    Re: New to the group Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-09-30 08:38 +0100
      Re: New to the group Walter Banks <walter@bytecraft.com> - 2015-09-30 10:58 -0400
  Re: New to the group Chris Curl <ccurl609@gmail.com> - 2015-10-01 06:04 -0700
    Re: New to the group rickman <gnuarm@gmail.com> - 2015-10-01 09:46 -0400
    Re: New to the group anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-10-08 06:07 +0000
      Re: New to the group Alfred Singlestone <vitonis@gmail.com> - 2015-10-09 04:04 -0700
        Re: New to the group rickman <gnuarm@gmail.com> - 2015-10-09 10:29 -0400
        Re: New to the group anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-10-09 15:30 +0000
  Re: New to the group lehs <skydda.barnen@gmail.com> - 2015-10-03 00:19 -0700
    Re: New to the group visualforth@rocketmail.com - 2015-10-03 17:01 -0700
    Re: New to the group anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-10-08 06:38 +0000
      Re: New to the group "Elizabeth D. Rather" <erather@forth.com> - 2015-10-07 21:15 -1000
        Minimal wordset (was: New to the group) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-10-08 13:39 +0000
          Re: Minimal wordset (was: New to the group) JUERGEN <epldfpga@aol.com> - 2015-10-08 08:13 -0700
            Re: Minimal wordset (was: New to the group) Mark Wills <markwills1970@gmail.com> - 2015-10-09 00:55 -0700
              Re: Minimal wordset Lars Brinkhoff <lars.spam@nocrew.org> - 2015-10-09 10:43 +0200
                Re: Minimal wordset Chris Curl <ccurl609@gmail.com> - 2015-10-09 06:56 -0700
                Re: Minimal wordset Lars Brinkhoff <lars.spam@nocrew.org> - 2015-10-09 19:44 +0200
                Re: Minimal wordset Paul Rubin <no.email@nospam.invalid> - 2015-10-09 14:02 -0700
                Re: Minimal wordset Jan Coombs <Jan-54 <jenfhaomndgfwutc@murmic.plus.com>> - 2015-10-10 09:44 +0100
                Re: Minimal wordset anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-10-10 11:36 +0000
                Re: Minimal wordset lehs <skydda.barnen@gmail.com> - 2015-10-09 08:40 -0700
                Re: Minimal wordset Lars Brinkhoff <lars.spam@nocrew.org> - 2015-10-09 19:53 +0200
                Re: Minimal wordset lehs <skydda.barnen@gmail.com> - 2015-10-09 11:22 -0700
                Re: Minimal wordset JUERGEN <epldfpga@aol.com> - 2015-10-09 11:33 -0700
                Re: Minimal wordset Lars Brinkhoff <lars.spam@nocrew.org> - 2015-10-09 20:38 +0200
                Re: Minimal wordset stephen@mpeforth.com (Stephen Pelc) - 2015-10-09 20:56 +0000
                Re: Minimal wordset rickman <gnuarm@gmail.com> - 2015-11-01 20:10 -0500
                Re: Minimal wordset Coos Haak <chforth@hccnet.nl> - 2015-11-02 03:05 +0100
                Re: Minimal wordset "Elizabeth D. Rather" <erather@forth.com> - 2015-11-01 16:08 -1000
                Re: Minimal wordset stephen@mpeforth.com (Stephen Pelc) - 2015-11-02 09:35 +0000
                Re: Minimal wordset anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-11-02 12:42 +0000
                Re: Minimal wordset humptydumpty <ouatubi@gmail.com> - 2015-11-08 23:22 -0800
                Re: Minimal wordset rickman <gnuarm@gmail.com> - 2015-11-03 11:25 -0500
                Re: Minimal wordset stephen@mpeforth.com (Stephen Pelc) - 2015-11-03 19:36 +0000
                Re: Minimal wordset "HAA" <someone@microsoft.com> - 2015-11-08 12:56 +1100
                Re: Minimal wordset stephen@mpeforth.com (Stephen Pelc) - 2015-11-08 16:14 +0000
                Re: Minimal wordset "HAA" <someone@microsoft.com> - 2015-11-09 11:55 +1100
                Re: Minimal wordset anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-11-02 09:41 +0000
                Re: Minimal wordset rickman <gnuarm@gmail.com> - 2015-11-03 11:29 -0500
                Re: Minimal wordset anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-11-03 17:01 +0000
                Re: Minimal wordset JUERGEN <epldfpga@aol.com> - 2015-10-09 11:27 -0700
            Re: Minimal wordset (was: New to the group) "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-10-09 23:11 -0400
              Re: Minimal wordset (was: New to the group) Jan Coombs <Jan-54 <jenfhaomndgfwutc@murmic.plus.com>> - 2015-10-10 08:38 +0100
      Re: New to the group dunno <dunno@dunno.dunno> - 2015-10-14 23:14 +0000
        Re: New to the group "Elizabeth D. Rather" <erather@forth.com> - 2015-10-14 16:21 -1000
        Re: New to the group anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-10-15 08:46 +0000
  Re: New to the group Chris Curl <ccurl609@gmail.com> - 2015-10-03 09:23 -0700
    Re: New to the group "Elizabeth D. Rather" <erather@forth.com> - 2015-10-03 09:19 -1000
  Re: New to the group lehs <skydda.barnen@gmail.com> - 2015-10-08 05:24 -0700
    Re: New to the group "Elizabeth D. Rather" <erather@forth.com> - 2015-10-08 08:22 -1000
      Re: New to the group lehs <skydda.barnen@gmail.com> - 2015-10-09 08:37 -0700
  Re: New to the group Chris Curl <ccurl609@gmail.com> - 2015-10-31 10:44 -0700

csiph-web