Menu

#167 Accessing an array w/o [] crashes

Crash
closed-fixed
5
2001-07-02
2001-05-02
No

If you define an array, and then attempt to access it
without the brackets "[]", the program will crash.
For instance, if you define a variable as follows:

Character c[5]

and then use it somewhere without the brackets:

SET d = c

the program will crash.

This should be caught by the compiler. Otherwise, the
program just crashes and you have no idea where the
error is coming from.

Discussion

  • Richard Clarke

    Richard Clarke - 2001-05-04

    Logged In: YES
    user_id=82309

    SCL now correctly reports an error if the subscripts for an
    array variable are omitted ("Missing Array Subscript").

    The problem was that SCL was going through some 'end of
    subscript parsing' checks using data that was only set up
    after parsing an opening "[".

    Changes made to:
    msglib/shrmsg.mc
    scl/scl_chk_routines.c
    scl/scl_act_routines.c
    scl/scl_sub_tbl.tpa

    Fixed in CVS (1.1 series only)

     
  • Richard Clarke

    Richard Clarke - 2001-05-04
    • assigned_to: nobody --> rclarke
    • status: open --> open-fixed
     
  • Richard Clarke

    Richard Clarke - 2001-05-04

    Logged In: YES
    user_id=82309

    SCL now correctly reports an error if the subscripts for an
    array variable are omitted ("Missing Array Subscript").

    The problem was that SCL was going through some 'end of
    subscript parsing' checks using data that was only set up
    after parsing an opening "[".

    Changes made to:
    msglib/shrmsg.mc
    scl/scl_chk_routines.c
    scl/scl_act_routines.c
    scl/scl_sub_tbl.tpa

    Fixed in CVS (1.1 series only)

     
  • Geoff Hall

    Geoff Hall - 2001-07-02
    • status: open-fixed --> closed-fixed
     
  • Geoff Hall

    Geoff Hall - 2001-07-02

    Logged In: YES
    user_id=81187

    Fix available in Release 1.2.0.

     

Log in to post a comment.