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

Witness::GoalTest is incorrect #93

Open
Samarium150 opened this issue Oct 14, 2024 · 0 comments
Open

Witness::GoalTest is incorrect #93

Samarium150 opened this issue Oct 14, 2024 · 0 comments

Comments

@Samarium150
Copy link
Contributor

@arc-s14 Witness::GoalTest method contains bugs

11e64fc:
puzzle

daff8ca:
puzzle

Some obvious ones:

  • If node.path is empty, then calling node.path.back() will cause undefined behaviour (memory access out of bound).

    hog2/environments/Witness.h

    Lines 2859 to 2861 in e470a47

    if (node.path.back().second <= height && node.path.back().first <= width && node.path.back().second >= 0 &&
    node.path.back().first >= 0)
    verdict = false; //return false;
  • Variables should be initialized.

    hog2/environments/Witness.h

    Lines 2908 to 2909 in e470a47

    int x_c;
    int y_c;
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