Skip to content

[Collections\contains?] fix segfault when index is out of bounds, on Windows. #2197

@github-actions

Description

@github-actions

For some reason, it doesn't throw an error, but it segfaults instead.

This only happens on Windows, See: https://github\.com/arturo\-lang/arturo/actions/runs/22114942575/job/63920495433?pr\=2196

assert -> contains?.at: neg 1 str (last str)

assert -> contains?.at: neg 1 blk (last blk)

assert -> contains?.at: neg 1 dict (last dict)

]

assert -> throws? [contains?.at: 2 [0 1] 0]

]

; TODO(Collections\contains?): fix segfault when index is out of bounds, on Windows.


        ]
    ]

    ; TODO(Collections\contains?): fix segfault when index is out of bounds, on Windows.
    ;   For some reason, it doesn't throw an error, but it segfaults instead.
    ;   This only happens on Windows, See: https://github.com/arturo-lang/arturo/actions/runs/22114942575/job/63920495433?pr=2196


    ; test.skip "negative index should verify from backyards" [
    ;     assert -> contains?.at: neg 1 str (last str)
    ;     assert -> contains?.at: neg 1 blk (last blk)
    ;     assert -> contains?.at: neg 1 dict (last dict)
    ; ]
    
    ; test.skip "should throw for index out of bounds" [
    ;     assert -> throws? [contains?.at: 2 [0 1] 0]
    ; ]

]

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcriticalCritical, top-priority issuestodoAutomatically generated issues from TODOs in the codewindowsWindows-related issues→ Collections

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions