updates for zig 0.15.1. #7
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This required some additional flags to make UBSan happy. For python 3.12.11 building without additional flags first led to:
Which can be fixed "properly" (as in not working around the ubsan checks) with the compiler flag
-fno-delete-null-pointer-checks
. I'm not entirely sold this is actually fixing things generically because after adding this I then got a null pointer overflow in the same location in tokenizer.c, but for a different python file deepfreeze.py:adding the flag to disable null pointer overflow checks in ubsan can work around this
-fno-sanitize=pointer-overflow
. Needing to disable this check seems like a red flag to me but I did not investigate the root cause as I assume diagnosing python issues is out of scope for this repo.Additionally since I was adding specific ubsan flags I re enabled ubsan for both python versions and disable only the alignment checks for python version 3.11.13. This allows other ubsan checks to continue to work. The specific ubsan flags ideally should be only applied to the offending c file. This seemed like it would upset the overall structure of the build so I add them as common flags.
For both versions I was able to run the produced python executable and run basic commands on linux. I haven't tried cross compiling or operation on other platforms.