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

Clear scratch_buffer in compile_and_invoke. #1568

Closed
wants to merge 1 commit into from

Conversation

zargovv
Copy link

@zargovv zargovv commented Oct 23, 2024

The scratch_buffer contains erroneous data in compile_and_invoke, therefore should be cleared.

@lerno
Copy link
Collaborator

lerno commented Oct 23, 2024

This fix would break execute_scripts(). This line:

(void) compile_and_invoke(scratch_buffer_to_string(), execs.len ? execs.ptr : "", NULL);

Needs to be

(void) compile_and_invoke(scratch_buffer_copy(), execs.len ? execs.ptr : "", NULL);

@lerno lerno changed the title Clear scratch_buffer in compile_and_invoke. Closes #1560. Clear scratch_buffer in compile_and_invoke. Oct 23, 2024
@lerno
Copy link
Collaborator

lerno commented Oct 23, 2024

This fix addresses #1560 yes, but let's not use "closes" since that would auto-close 1560, which is not desirable. Once it is fixed, we request the reporter to check that the issue is properly fixed instead. This is an extra check.

@lerno
Copy link
Collaborator

lerno commented Oct 23, 2024

I incorporated it into a fix, together with the additional lines needed. Thanks for tracking it down!

@zargovv
Copy link
Author

zargovv commented Oct 23, 2024

This fix addresses #1560 yes, but let's not use "closes" since that would auto-close 1560, which is not desirable. Once it is fixed, we request the reporter to check that the issue is properly fixed instead. This is an extra check.

Sorry for the inconvenience caused by the pull request.

I'll keep that in mind for any future submissions. Thanks for the review!

@zargovv zargovv closed this Oct 23, 2024
@lerno
Copy link
Collaborator

lerno commented Oct 24, 2024

No it's fine, no worries. Thank you for finding the issue!

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