Skip to content

Avoid invalid memory reference when 1st arg of path-build is "" #942

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

Merged
merged 3 commits into from
May 6, 2025

Conversation

Jarhmander
Copy link
Contributor

Avoid invalid memory reference when 1st arg of path-build is ""

Before:

> (path-build "" "a")
Exception: invalid memory reference.  Some debugging context lost
Type (debug) to enter the debugger.

After:

> (path-build "" "a")
"a"

Code was simplified a bit at some places to exploit the new changes, but without changing existing behavior.

@burgerrg
Copy link
Contributor

burgerrg commented May 1, 2025

Thanks for finding this! There's another definition of path-build in s/reboot.ss that may need to be updated as well.

@Jarhmander Jarhmander force-pushed the fix-build-path branch 2 times, most recently from c3945e0 to cc2f766 Compare May 1, 2025 15:46
@Jarhmander
Copy link
Contributor Author

Thanks for finding this! There's another definition of path-build in s/reboot.ss that may need to be updated as well.

Thanks!

For the occurrence in s/reboot.ss, I didn't fully understand why this (re?)definition is here, and I just assumed that this script worked correctly in normal circumstances, and since this path-build function is not exported, it could be left alone. I nevertheless modified it to act like the one in 6.ss.

@burgerrg
Copy link
Contributor

burgerrg commented May 1, 2025

I think reboot.ss is loaded by older versions of Chez Scheme, so it's good to have it updated.

Please also add a subsection in the release notes under bugs fixed about this. Thanks!

@Jarhmander Jarhmander requested a review from burgerrg May 2, 2025 01:53
Copy link
Contributor

@burgerrg burgerrg left a comment

Choose a reason for hiding this comment

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

Thank you!

@burgerrg burgerrg merged commit db82857 into cisco:main May 6, 2025
16 checks passed
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