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

Fixes to bef2c & befprof #3

Merged
merged 1 commit into from
May 23, 2018
Merged

Conversation

serprex
Copy link
Contributor

@serprex serprex commented Feb 12, 2016

Double free due to double fclose
Trampoline at leftmost/topmost edges
Don't print \0 into sourcecode
Use %% instead of %c with '%' being passed in
Avoid freeing fo/fi on failure to open

I stopped into IRC a few years ago & said hello. Well, hello again. Been getting back into Befunge by writing a program that JITs Befunge code into Python bytecode (using the Python stack itself as the Befunge stack, wee segfaulting CPython's not-memory-safe bytecode)

Double free due to double fclose
Trampoline at leftmost/topmost edges
Don't print \0 into sourcecode
Use %% instead of %c with '%' being passed in
Avoid freeing fo/fi on failure to open
@serprex serprex mentioned this pull request Feb 21, 2016
@cpressey
Copy link
Member

Well, hello yourself! (Your nick does sound vaguely familiar...) Sorry I haven't had time to look at this PR yet, but I do have a sizeable backlog of Befunge-related stuff that I'm planning to plow through sometime this year, and fear not, I will address this as part of it. Thanks!

@serprex
Copy link
Contributor Author

serprex commented May 12, 2018

Thanks!

np

@cpressey
Copy link
Member

cpressey commented May 18, 2018

The good news is that, even though this did not get done 2 years ago, or last year, there is a very good chance it will get done this year, because Befunge turns 25 years old this year, and this is what my TODO list looks like as of today.

@cpressey cpressey changed the base branch from master to bef2c-befprof-fixes May 22, 2018 08:57
fclose (fi);
fclose (fo);
if (fi) fclose (fi);
if (fo) fclose (fo);
if ((fi = fopen ("temp.c", "r")) != NULL)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to understand this part, I read the code and realized it defines two filehandle variables and then re-uses them for everything. Wow. This sort of coding probably seemed less odd back then than it does today.

@cpressey
Copy link
Member

@serprex Looks good to me. I'm going to merge this into bef2c-befprof-fixes (the new feature branch I created for this) and it will eventually make it down into develop-2018-1 (development branch for releasing a new version this year). Ideally I'd like to test all the changes on a couple of systems (AmigaDOS 1.3, MS-DOS, ...) before releasing.

I assume you'e OK with the current license, etc? I'll add your name as a contributor (in the source code I guess, since this distribution doesn't seem to have a contributors list anywhere.)

@serprex
Copy link
Contributor Author

serprex commented May 22, 2018

OK with current license & etc

@cpressey cpressey merged commit 85da2a1 into catseye:bef2c-befprof-fixes May 23, 2018
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

Successfully merging this pull request may close these issues.

2 participants