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

[aarch64] Allocate LJ_TISNUM early #70

Closed
wants to merge 1 commit into from
Closed

[aarch64] Allocate LJ_TISNUM early #70

wants to merge 1 commit into from

Conversation

siddhesh
Copy link
Collaborator

LJ_TISNUM is allocated too late in the cycle and it ends up reusing a
different register, resulting in a crash under register pressure.
Hoist the allocation to the top so that it is done early enough and
the allowed register set no longer contains that register. This also
has the nice side effect of beig slightly faster since it hoists a
constant allocation out of the generated loop.

LJ_TISNUM is allocated too late in the cycle and it ends up reusing a
different register, resulting in a crash under register pressure.
Hoist the allocation to the top so that it is done early enough and
the allowed register set no longer contains that register.  This also
has the nice side effect of beig slightly faster since it hoists a
constant allocation out of the generated loop.
@agentzh
Copy link
Member

agentzh commented Aug 2, 2019

Merged. Thanks.

@agentzh agentzh closed this Aug 2, 2019
@agentzh
Copy link
Member

agentzh commented Sep 2, 2019

Just for the record, this bug led to random crashes when fuzzing our edgelang and ylang compilers on aarch64. And random seed numbers had to be used to feed the API function jit.prngstate to reproduce this more frequently. And this work was sponsored by OpenResty Inc :)

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.

None yet

2 participants