Conversation
… messes up the indices used for loading variables
…so the pre-commit hook doesn't have to fix that every time
Static analysis reportLizard reportListing only functions with cyclomatic complexity >= 15 or NLOC >= 100 or parameters >= 6.
Report about files you didn't modify in this PR
CppCheck report
Report files about files you didn't modify in this PR
|
Fuzzing report/usr/local/bin/afl-whatsup status check tool for afl-fuzz by Michal Zalewski Summary statsCycles without finds : 0 [+] Captured 42876 tuples (map size 238646, highest value 255, total values 443393049) in '/dev/null'. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Tail calls avoid the usual mechanism for calling functions and directly jump to the top of the function, after having pushed the arguments for the call. Then the function does its usual
STORE <arg>.... However, in the following code samplexwould be bound toausing aSTORE_FROM_INDEX, which works on the first call but not after performing the tail call, as the locals stack isn't reset, andSTORE_FROM_INDEXis called with index 1 which points tobinstead ofa, since the stack now holds(a, b, x).This PR adds a new instruction
TAIL_CALL_SELFwhich handles the jump to 0 and resets the scope (only resets indices, does not erase values from the stack, as this is useless).Checklist