History log of /src/lib/libc/arch/sh3/gen/setjmp.S |
Revision | | Date | Author | Comments |
1.12 |
| 17-Jul-2024 |
uwe | sh3: siglongjmp - restore register context first (PR lib/57946)
|
1.11 |
| 11-Oct-2023 |
skrll | branches: 1.11.2; Consistently pass 0 as first and ignored argument to sigprocmask in the setjmp implementations.
NFCI.
|
1.10 |
| 05-Jan-2006 |
uwe | branches: 1.10.88; 1.10.96; Use PIC_PROLOGUE_NOSAVE in long jumps, where we don't need to preserve r12. While here, swap the order in which r4 and r5 saved on the stack so that r4 is restored further away from its first use.
|
1.9 |
| 05-Jan-2006 |
uwe | Oops, supply correct label for __longjmp14 .size directive.
|
1.8 |
| 05-Jan-2006 |
uwe | Use PLT for PIC calls to avoids text relocs in the shared library. Use constants from <machine/setjmp.h> for better readability. Provide .size directives.
|
1.7 |
| 15-Sep-2005 |
uwe | Switch arch/sh3/gen to the new compat code layout.
|
1.6 |
| 07-Aug-2003 |
agc | branches: 1.6.6; Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22280, verified by myself.
|
1.5 |
| 01-Jul-2003 |
marcus | Generate proper PIC code for libc_pic.a.
|
1.4 |
| 11-May-2001 |
msaitoh | style fix (no functional change)
|
1.3 |
| 14-Feb-2001 |
msaitoh | branches: 1.3.2; use _C_LABEL()
|
1.2 |
| 04-Aug-2000 |
tsubai | Change comment character from '#' to '!'. (binutils-2.10 doesn't like '#')
|
1.1 |
| 05-Jan-2000 |
msaitoh | libc for SH3. TODO: fplib
|
1.3.2.1 |
| 08-Oct-2001 |
nathanw | Catch up to -current.
|
1.6.6.1 |
| 22-Jan-2006 |
tron | Apply patch (requested by uwe in ticket #1100): Use PLT for PIC calls to avoids text relocs in the shared library.
|
1.10.96.1 |
| 23-Aug-2024 |
martin | Pull up following revision(s) (requested by riastradh in ticket #795):
tests/lib/libc/setjmp/Makefile: revision 1.3 distrib/sets/lists/debug/mi: revision 1.425 lib/libc/arch/sh3/gen/setjmp.S: revision 1.12 lib/libc/arch/i386/gen/sigsetjmp.S: revision 1.19 lib/libc/arch/x86_64/gen/__setjmp14.S: revision 1.4 tests/lib/libc/setjmp/t_sigstack.c: revision 1.10 tests/lib/libc/setjmp/t_sigstack.c: revision 1.11 tests/lib/libc/setjmp/t_sigstack.c: revision 1.12 tests/lib/libc/setjmp/t_sigstack.c: revision 1.1 lib/libc/arch/sh3/gen/sigsetjmp.S: revision 1.11 tests/lib/libc/setjmp/t_sigstack.c: revision 1.2 tests/lib/libc/setjmp/t_sigstack.c: revision 1.3 tests/lib/libc/setjmp/t_sigstack.c: revision 1.4 tests/lib/libc/setjmp/t_sigstack.c: revision 1.5 tests/lib/libc/setjmp/t_sigstack.c: revision 1.6 lib/libc/arch/arm/gen/setjmp.S: revision 1.19 tests/lib/libc/setjmp/t_sigstack.c: revision 1.7 tests/lib/libc/setjmp/t_sigstack.c: revision 1.8 tests/lib/libc/setjmp/t_sigstack.c: revision 1.9 lib/libc/arch/i386/gen/setjmp.S: revision 1.18 lib/libc/arch/x86_64/gen/__sigsetjmp14.S: revision 1.4 distrib/sets/lists/tests/mi: revision 1.1306
longjmp(3): Add test for PR lib/57946.
longjmp(3): Paranoia: more error checking in PR lib/57946 test.
longjmp(3): Test signal mask vs stack restore with siglongjmp too. PR lib/57946
longjmp(3) t_sigstack: Print which entry failed. PR lib/57946
longjmp(3) t_sigstack: Note aarch64 seems to DTRT. But only by code inspection; it appears to have another problem: on re-entry, the signal handler is called on the normal stack, not on the alternate signal stack. PR lib/57946
longjmp(3) t_sigstack: Use a sigaltstack per handler entry. longjmp evidently doesn't reset the state of whether the process is executing on the alternate signal stack. So when we re-enter the signal handler, the alternate stack appears to be still in use, and the system chooses the original stack for the second call to the signal handler -- which trips our assertion asking to verify that the signal handler is always using an alternate stack.
Not strictly necessary for the signal handler to use an alternate stack on re-entry, but this makes it clearer that the signal handler itself is always using the alternate stack so we can verify that the interrupted code is _not_ in the signal handler. With this change, the test now passes on aarch64. PR lib/57946
longjmp(3) t_sigstack: Fix fencepost error. Extremely unlikely to cause trouble, but let's just turn that into `never' to keep it easier for readers. PR lib/57946
amd64 longjmp: Restore stack first, then signal mask. Otherwise, a pending signal may be delivered on the wrong stack when we restore the signal mask.
While here: - Tidy the code a little bit. - Sprinkle comments to explain what's going on. - Use `xorl %eXX,%eXX' instead of `xorq %rXX,%rXX'. => Same effect, one byte shorter, breaks dep chain on more uarches. - Use forward branches for statically predicted not-taken. => val==0 is unlikely in longjmp PR lib/57946
i386 longjmp: Restore stack first, then signal mask. Otherwise, a pending signal may be delivered on the wrong stack when we restore the signal mask.
While here: - Tidy the code a little bit. - Sprinkle comments to explain what's going on. - Use forward branches for statically predicted not-taken. => val==0 is unlikely in longjmp PR lib/57946
arm longjmp: Restore stack first, then signal mask. Otherwise, a pending signal may be delivered on the wrong stack when we restore the signal mask.
While here: - Move the botched sp and lr tests earlier. PR lib/57946 arm has been fixed
tests/lib/libc/setjmp/t_sigstack: Add missing comment for 1.10. PR lib/57946
sh3: siglongjmp - restore register context first (PR lib/57946)
|
1.10.88.1 |
| 23-Aug-2024 |
martin | Pull up following revision(s) (requested by riastradh in ticket #795):
tests/lib/libc/setjmp/Makefile: revision 1.3 distrib/sets/lists/debug/mi: revision 1.425 lib/libc/arch/sh3/gen/setjmp.S: revision 1.12 lib/libc/arch/i386/gen/sigsetjmp.S: revision 1.19 lib/libc/arch/x86_64/gen/__setjmp14.S: revision 1.4 tests/lib/libc/setjmp/t_sigstack.c: revision 1.10 tests/lib/libc/setjmp/t_sigstack.c: revision 1.11 tests/lib/libc/setjmp/t_sigstack.c: revision 1.12 tests/lib/libc/setjmp/t_sigstack.c: revision 1.1 lib/libc/arch/sh3/gen/sigsetjmp.S: revision 1.11 tests/lib/libc/setjmp/t_sigstack.c: revision 1.2 tests/lib/libc/setjmp/t_sigstack.c: revision 1.3 tests/lib/libc/setjmp/t_sigstack.c: revision 1.4 tests/lib/libc/setjmp/t_sigstack.c: revision 1.5 tests/lib/libc/setjmp/t_sigstack.c: revision 1.6 lib/libc/arch/arm/gen/setjmp.S: revision 1.19 tests/lib/libc/setjmp/t_sigstack.c: revision 1.7 tests/lib/libc/setjmp/t_sigstack.c: revision 1.8 tests/lib/libc/setjmp/t_sigstack.c: revision 1.9 lib/libc/arch/i386/gen/setjmp.S: revision 1.18 lib/libc/arch/x86_64/gen/__sigsetjmp14.S: revision 1.4 distrib/sets/lists/tests/mi: revision 1.1306 (patch)
longjmp(3): Add test for PR lib/57946.
longjmp(3): Paranoia: more error checking in PR lib/57946 test.
longjmp(3): Test signal mask vs stack restore with siglongjmp too. PR lib/57946
longjmp(3) t_sigstack: Print which entry failed. PR lib/57946
longjmp(3) t_sigstack: Note aarch64 seems to DTRT. But only by code inspection; it appears to have another problem: on re-entry, the signal handler is called on the normal stack, not on the alternate signal stack. PR lib/57946
longjmp(3) t_sigstack: Use a sigaltstack per handler entry. longjmp evidently doesn't reset the state of whether the process is executing on the alternate signal stack. So when we re-enter the signal handler, the alternate stack appears to be still in use, and the system chooses the original stack for the second call to the signal handler -- which trips our assertion asking to verify that the signal handler is always using an alternate stack.
Not strictly necessary for the signal handler to use an alternate stack on re-entry, but this makes it clearer that the signal handler itself is always using the alternate stack so we can verify that the interrupted code is _not_ in the signal handler. With this change, the test now passes on aarch64. PR lib/57946
longjmp(3) t_sigstack: Fix fencepost error. Extremely unlikely to cause trouble, but let's just turn that into `never' to keep it easier for readers. PR lib/57946
amd64 longjmp: Restore stack first, then signal mask. Otherwise, a pending signal may be delivered on the wrong stack when we restore the signal mask.
While here: - Tidy the code a little bit. - Sprinkle comments to explain what's going on. - Use `xorl %eXX,%eXX' instead of `xorq %rXX,%rXX'. => Same effect, one byte shorter, breaks dep chain on more uarches. - Use forward branches for statically predicted not-taken. => val==0 is unlikely in longjmp PR lib/57946
i386 longjmp: Restore stack first, then signal mask. Otherwise, a pending signal may be delivered on the wrong stack when we restore the signal mask.
While here: - Tidy the code a little bit. - Sprinkle comments to explain what's going on. - Use forward branches for statically predicted not-taken. => val==0 is unlikely in longjmp PR lib/57946
arm longjmp: Restore stack first, then signal mask. Otherwise, a pending signal may be delivered on the wrong stack when we restore the signal mask.
While here: - Move the botched sp and lr tests earlier. PR lib/57946 arm has been fixed
tests/lib/libc/setjmp/t_sigstack: Add missing comment for 1.10. PR lib/57946
sh3: siglongjmp - restore register context first (PR lib/57946)
|
1.11.2.1 |
| 02-Aug-2025 |
perseant | Sync with HEAD
|