Skip to content

memcpy transform to sw with unaligned buffers #16

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

Closed
ghost opened this issue Dec 2, 2019 · 2 comments
Closed

memcpy transform to sw with unaligned buffers #16

ghost opened this issue Dec 2, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Dec 2, 2019

test_aligment.zip

     2: 00000020     1 OBJECT  LOCAL  DEFAULT    3 c
     8: 00000021     8 OBJECT  GLOBAL DEFAULT    3 b
     7: 00000030     8 OBJECT  GLOBAL DEFAULT    3 a
80000088 bar:
...
80000098: 00 00 12 00 63 61 00 00       move r2, 0x21
800000a0: 00 00 02 44 08 7c 00 00       sw r2, 0x0, r1

as c makes b not aligned on 8 bytes, the transformation of memcpy to sw is not legal and produces a memory fault at runtime.

@ghost ghost added the bug Something isn't working label Dec 2, 2019
@ghost
Copy link
Author

ghost commented Dec 2, 2019

Seen initially from tests in supertest:

4/11/2/3/t2.c		
4/11/3/1/t1.c
C99/7/21/2/3/t2.c		
C99/7/21/3/1/t1.c

@ghost
Copy link
Author

ghost commented Jan 16, 2020

fix by c8c7ca7623a

@ghost ghost closed this as completed Jan 16, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

0 participants