Skip to content

Wrong number of arguments in a macro crashes the macro processor #411

Closed
@SuperFola

Description

@SuperFola

What happened?

Giving too many (or not enough) arguments to a macro results in a bad_variant access / segmentation fault.

This has been found thanks to https://github.com/AFLplusplus/AFLplusplus

What ArkScript version are you seeing the problem on?

dev

Relevant code & log output

!{defun (name args body)
    (let name (fun args body))}
(defun foo () 0 1)

!{last () (print (@ args -1))}
(last 1 2)

Documentation

  • I have read existing related documentation before submitting this report
  • I have searched for an existing issue before posting

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions