diff options
author | Rich Felker <dalias@aerifal.cx> | 2017-10-13 10:23:48 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2017-10-13 10:28:52 -0400 |
commit | e364774d7ca0a78db1b8457d5094b747eb2df318 (patch) | |
tree | 64b13e59d66bbb8099d8f4a5b1775ba90fbb9a09 /src/unistd/lseek.c | |
parent | 48be5b6313d7b827acf555769e93b389fa9f6307 (diff) | |
download | musl-e364774d7ca0a78db1b8457d5094b747eb2df318.tar.gz musl-e364774d7ca0a78db1b8457d5094b747eb2df318.tar.xz musl-e364774d7ca0a78db1b8457d5094b747eb2df318.zip |
fix access by setjmp and longjmp to __hwcap on arm built as thumb2
this is a subtle issue with how the assembler/linker work. for the adr pseudo-instruction used to find __hwcap, the assembler in thumb mode generates a 16-bit thumb add instruction which can only represent word-aligned addresses, despite not knowing the alignment of the label. if the setjmp function is assigned a non-multiple-of-4 address at link time, the load then loads from the wrong address (the last instruction rather than the data containing the offset) and ends up reading nonsense instead of the value of __hwcap. this in turn causes the checks for floating-point/vector register sets (e.g. IWMMX) to evaluate incorrectly, crashing when setjmp/longjmp try to save/restore those registers. fix based on bug report by Felix Hädicke.
Diffstat (limited to 'src/unistd/lseek.c')
0 files changed, 0 insertions, 0 deletions