Skip to content

Crash Interpreter when arguments are wrong #392

@m11o

Description

@m11o

In the wasm site, it was crashed when arguments are wrong in defined methods.

For example,

> (define sum (lambda (a b) (+ a b)))
3
> (sum 10 20)
30
> (sum 10)
RuntimeError: unreachable
    at zip-lambda-args (https://pollrobots.com/scheme/wasm/scheme.wasm:wasm-function[248]:0xbf79)
    at apply-lambda (https://pollrobots.com/scheme/wasm/scheme.wasm:wasm-function[241]:0xbd9f)
    at cont-apply-form (https://pollrobots.com/scheme/wasm/scheme.wasm:wasm-function[238]:0xbbee)
    at eval (https://pollrobots.com/scheme/wasm/scheme.wasm:wasm-function[232]:0xb7c9)
    at a.eval (https://pollrobots.com/scheme/67.d46c0a73400b858e9b00.js:1:3894)
    at a.processLine (https://pollrobots.com/scheme/67.d46c0a73400b858e9b00.js:1:8704)
    at Object.onInput (https://pollrobots.com/scheme/67.d46c0a73400b858e9b00.js:1:14287)
    at Object.onMessage (https://pollrobots.com/scheme/67.d46c0a73400b858e9b00.js:1:12005)
    at https://pollrobots.com/scheme/67.d46c0a73400b858e9b00.js:1:10930

Press <Enter> to restart scheme runtime.
stopped:

Version: v0.1-136-gb5ce0b8

We expect to display messages of errors not crashing. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions