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

Possible bug with k and j #4

Open
tjol opened this issue Aug 14, 2021 · 2 comments
Open

Possible bug with k and j #4

tjol opened this issue Aug 14, 2021 · 2 comments

Comments

@tjol
Copy link
Contributor

tjol commented Aug 14, 2021

Hi! I've been working on my own little Funge-98 interpreter and I've been testing against other interpreters, including of course cfunge. In testing the k instruction, I ran into a fair amount of undefined behaviour with different interpreters doing different reasonable things, but there's one thing that I think is a bug in cfunge in which iterating (k) the jump (j) instruction jumps too far.

To illustrate, this program:

332kjvvvvvvvvv          @
     123456789
     >>>>>>>>>  v
,a.,k7"2 * 3 = "<    v
vvvvvvvvvvvvvvvjk3::4<@
fedcba9876543210
>>>>>>>>>>>>>>>> v
@,a.,k7"4 * 3 = "<

prints

2 * 3 = 7 
4 * 3 = 14 

in cfunge, but

2 * 3 = 6 
4 * 3 = 12 

in every other interpreter I've tried (rcfunge, fbbi, ccbi, pyfunge).

If you're interested, here's my larger “edge cases of k’ test: https://github.com/tjol/rfunge/blob/f8a55e38be491e550e69d871a435004e8d58a176/tests/manual_tests/k.b98

[again, no pressure for you to actually spend any time on this if you have better things to do]

@VorpalBlade
Copy link
Owner

I don't have time to look at this right now, but do you happen to know if this is something tested by the Mycology test suit?

@tjol
Copy link
Contributor Author

tjol commented Aug 23, 2021

I don't have time to look at this right now, but do you happen to know if this is something tested by the Mycology test suit?

It's not.

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

2 participants