Menu

#2 Strange LEFT$ behaviour and Segmentation Fault

v1.0 (example)
closed
None
5
2014-09-24
2014-09-08
iii-iii
No

I am pasting this from version 1.19. The same occurs in 1.20 but I cannot paste because of the graphics window.

./brandy
Brandy Basic V Interpreter Version 1.0.19 (Linux) 09/10/2005

Starting with 524288 bytes free

Basicvars is at &0x6495c0, tokenised line is at &0x649080
Workspace is at &0x7f2285971010, size is &80000, page = &0x7f2285971010, himem = &0x7f22859f1010

LOAD "PRE.BAS"
RUN
THIS IS THE ONE
PUTTING INTO ARRAY
?ONE
1>ONE
PUTTING INTO ARRAY
?TWO
2>TWO
PUTTING INTO ARRAY
?THREE
3>THREE
PUTTING INTO ARRAY
?
PROCESSING DOIF
NOW IN DOIF SUB
CONSIDERING FOR DOEND
CONSIDERING TWO FOR DOEND
CONSIDERING THREE FOR DOEND
REMOVING TABS AND ADDING LINE NUMBERS
1]100 "
Address is out of range at line 2700
LIST 2700
2700L$=T$(J)
PRINT L$
100 "
PRINT LEFT$(L$,1)
1Segmentation fault

1 Attachments

Discussion

  • iii-iii

    iii-iii - 2014-09-08

    ./brandy
    Brandy Basic V Interpreter Version 1.0.19 (Linux) 09/10/2005

    Starting with 524288 bytes free

    Basicvars is at &0x6495c0, tokenised line is at &0x649080
    Workspace is at &0x7f723e4fc010, size is &80000, page = &0x7f723e4fc010, himem = &0x7f723e57c010

    LOAD "PRE.BAS"
    RUN
    THIS IS THE ONE
    PUTTING INTO ARRAY
    ?ONE
    1>ONE
    PUTTING INTO ARRAY
    ?
    PROCESSING DOIF
    NOW IN DOIF SUB
    CONSIDERING FOR DOEND
    REMOVING TABS AND ADDING LINE NUMBERS
    Address is out of range at line 2700
    LIST 2700
    2700L$=T$(J)
    PRINT T$(J)

    PRINT L$

    PRINT LEN(L$)
    3
    PRINT LEFT$(L$,3)

    PRINT LEFT$(L$,2)
    Segmentation fault

     
  • Anonymous

    Anonymous - 2014-09-24

    This has been tracked down to a pointer alignment issue on 64-bit systems. A new release with a fix is in progress.

     
  • Anonymous

    Anonymous - 2014-09-24
    • status: open --> closed
    • assigned_to: Colin Tuckley
     
  • Anonymous

    Anonymous - 2014-09-24

    This is now fixed in 1.20.1

     

Log in to post a comment.

MongoDB Logo MongoDB