Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program received signal SIGSEGV, Segmentation fault #6

Open
pointhi opened this issue Feb 16, 2018 · 0 comments
Open

Program received signal SIGSEGV, Segmentation fault #6

pointhi opened this issue Feb 16, 2018 · 0 comments

Comments

@pointhi
Copy link

pointhi commented Feb 16, 2018

I found a code snippet which results in a segfault of the interpreter

#define TEST
#include "tcl.c"

#define TCL_BENCH "set i 0; while {< $i 1} {if {== [- $i] -1} {} {set i [+ $i 1]}}"

int main() {
    struct tcl tcl;
    tcl_init(&tcl);

    tcl_eval(&tcl, TCL_BENCH, sizeof(TCL_BENCH));

    tcl_destroy(&tcl);

    return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant