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

Test Performance with Latest HW Drop #126

Open
aroelke opened this issue May 3, 2021 · 2 comments
Open

Test Performance with Latest HW Drop #126

aroelke opened this issue May 3, 2021 · 2 comments

Comments

@aroelke
Copy link
Contributor

aroelke commented May 3, 2021

Current state of functionality:

32-bit Positive Negative
rwx works works
heap - stanford_int_treesort_fixed fails with violation
- everything else works
works
stack works works
cfi - inline_asm_works_1 fails with violation
- everything else works
works
threeClass works works
64-bit Positive Negative
rwx works works
heap - stanford_int_treesort_fixed fails with violation
- everything else works
- offset_free_fails_1 hangs
- everything else works
stack works works
cfi - inline_asm_works_1 fails with violation
- everything else works
works
threeClass works works
@aroelke
Copy link
Contributor Author

aroelke commented May 3, 2021

64-bit heap/offset_free_fails_1: misaligned load in pvPortFree, specifically with ld a1,8(a1) at PC 0xc00248c4 attempting to load 8 bytes from address 0xc008238c. This causes an exception in the AP for which there is no handler, so it jumps to PC 0x0 and hangs there (looping on exceptions, since that's also illegal).

This is due to an explicit addition of 4 to the pointer to the allocated memory, which on a 64-bit system causes it to point to the middle of a word, which maps to the same tag as the word-aligned original value (preventing detection of the illegal free), but confusing our heap allocation library.

Addressed by #127.

@aroelke
Copy link
Contributor Author

aroelke commented May 4, 2021

The cfi policy appears to require a "Target" tag for all instructions that can be jumped to (whether using direct jumps like jal or indirect ones like beq), but the branch targets of the code in the inline assembly of inline_asm_works_1 do not have this tag.

This is a compiler bug and may not be fixed.

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

No branches or pull requests

1 participant