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

Mangled output of ANSI escape sequences in v1.11.0 and master branch #56

Open
eliminmax opened this issue Jun 30, 2023 · 4 comments
Open

Comments

@eliminmax
Copy link

eliminmax commented Jun 30, 2023

I am sorry that I can't think of a better way to put this, but bfc installed with cargo install --git (tested with both the master branch and tag 1.11.0) mangles the output of a program I wrote.

My program's output should be a mix of ANSI escape sequences and whitespace that look like the following:
image

Instead, I get this:

image

Testing the same code with a different compiler (specifically ebfc from ELFkickers 3.2) and 2 interpreters (beef and one rather slow one I created myself and have not yet released publicly) have the expected output. Additionally, older versions of bfc work as expected. I installed version 1.10.0 with the command cargo install --git https://github.com/Wilfred/bfc.git --tag 1.10.0 and that worked properly.

In case it is helpful, the code for my colortest.bf program is here.

I have an asciinema recording comparing the output of bfc with the other compiler and interpreters which can be viewed here

@eliminmax
Copy link
Author

Using git bisect, I was able to determine that the issue was introduced in commit 8709150, which is the one tagged 1.11.0. The commit before that one, c60c995, works properly.

Wilfred added a commit that referenced this issue Sep 17, 2023
This reverts commit 8709150.

The optimisation was not sound, see example in #56.
@Wilfred
Copy link
Owner

Wilfred commented Sep 17, 2023

Thanks for the great report and repros. :)

I've released 1.12 that reverts this bad optimisation, and I'll work out what's wrong with the optimisation and add a fixed version at some point in the future.

@eliminmax
Copy link
Author

Just gave version 1.12.0 a try, and it is working perfectly. Thanks!

@Wilfred
Copy link
Owner

Wilfred commented Sep 20, 2023

Glad to hear it! I'm going to leave this open so I can fix the optimisation with the repro given.

@Wilfred Wilfred reopened this Sep 20, 2023
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