2
0
mirror of https://github.com/boostorg/context.git synced 2026-01-24 17:52:41 +00:00
Commit Graph

996 Commits

Author SHA1 Message Date
Oliver Kowalke
29ee8e59b2 support of s390x + clang
- #208
2022-10-04 07:01:25 +02:00
Oliver Kowalke
ee045f8f0a Merge pull request #206 from Kojoley/ci-multiarch
CI: Test multiple architectures
2022-10-04 06:57:54 +02:00
Oliver Kowalke
86b4e7110f Merge pull request #207 from PeterYang12/feature/shadowstack
Add shadow stack support for fcontext
2022-09-30 15:31:01 +02:00
PeterYang12
3484575878 Add shadow stack support for fcontext
Shadow stack is part of Intel's Control-Flow Enforcement Technology.

    Whenever a function is called, the return address is pushed onto both
    the regular stack and the shadow stack. When that function returns, the
    return addresses are popped off both stacks and compared; if they fail
    to match, #CP raised.

    Backport this commit from https://github.com/php/php-src/pull/9283
    With this commit, we create shadow stack with syscall map_shadow_stack
    (no.451) for each fiber context and switch the shadow stack accordingly
    during fcontext switch.

Signed-off-by: PeterYang12 <yuhan.yang@intel.com>
Signed-off-by: chen-hu-97 <hu1.chen@intel.com>
2022-09-29 22:58:22 -07:00
Nikita Kniazev
49f1ff9074 Replace Boost.Test with lightweight tester 2022-09-19 05:04:18 +03:00
Nikita Kniazev
b6583a468a CI: Test multiple architectures 2022-09-19 05:04:17 +03:00
Nikita Kniazev
8701343ace Tests: Autodetect segmented stack availability 2022-09-19 05:00:41 +03:00
Oliver Kowalke
97a0054999 Merge pull request #205 from apolukhin/antoshkka/stack-protector
Support for stack protection
2022-09-18 16:25:02 +02:00
Oliver Kowalke
a8f60b9576 Merge pull request #204 from barracuda156/darwin-ppc
Fixes for currently broken Darwin ppc/ppc64 assembler
2022-09-18 16:21:19 +02:00
Oliver Kowalke
cfcccbb587 remove friend declaration of calllcc() in clas fiber
- #202
2022-09-18 16:03:36 +02:00
Oliver Kowalke
5852b49355 change address model to 32bit for x32 ABI
related to issue #200
2022-09-18 15:52:47 +02:00
Antony Polukhin
f96d65bc37 fix again 2022-09-18 11:19:22 +03:00
Antony Polukhin
a6e3302f91 fix 2022-09-18 11:02:23 +03:00
Antony Polukhin
2f0b5034b7 Support for stack protection 2022-09-17 18:38:12 +03:00
Sergey Fedorov
5f7e1f216c powerpc-darwin: does not use TOC on ppc64 2022-09-06 04:44:16 +07:00
Sergey Fedorov
1cdfb35343 powerpc-darwin: fix broken code in make_ppc* assembler 2022-09-06 02:54:06 +07:00
Sergey Fedorov
5f2c355042 powerpc-darwin: fix assembler comment character 2022-09-06 02:47:32 +07:00
Oliver Kowalke
87135f923e Merge pull request #201 from dixyes/win_arm64
Windows arm64 fcontext support
boost-1.80.0
2022-07-05 07:48:15 +02:00
dixyes
abf8e04e23 Spport Windows arm64 cpp exception
Windows C++ exception unwinding needs TEB(TIB) stack info matching real
stack.
2022-06-26 09:53:11 +08:00
dixyes
697299ea55 Add windows arm64 fcontext support 2022-06-26 09:51:30 +08:00
Oliver Kowalke
b6ff3fd02f Merge pull request #199 from PeterYang12/endbr
Add support for Indirect Branch Tracking (IBT)
2022-05-16 10:39:25 +02:00
PeterYang12
b62a991ee6 Add support for Indirect Branch Tracking (IBT)
Indirect Branch Tracking(IBT) is part of Intel's Control-Flow
Enforcement Technology(CET). IBT is hardware based, forward edge
Control-Flow-Integrity mechanism where any indirect CALL/JMP must
target an ENDBR instruction or suffer #CP.

This commit inserts endbr64 instruction in assembly to support IBT.
2022-05-16 00:15:57 -07:00
Oliver Kowalke
fb8cda1274 Merge pull request #197 from loongson-zn/develop
Add support for loongarch64
boost-1.80.0.beta1 boost-1.79.0.beta1 boost-1.79.0
2022-02-21 07:19:45 +01:00
Zhang Na
e1001c479e Add support for loongarch64 2022-02-15 17:28:33 +08:00
Oliver Kowalke
83f998828c Merge pull request #192 from brad0/develop
Add support for building on riscv64 with Clang
boost-1.78.0
2021-11-12 11:30:26 +01:00
Brad Smith
04ab01d386 Add support for building on riscv64 with Clang 2021-11-12 04:35:18 -05:00
Oliver Kowalke
885130bd17 use boost::context:.detail::invoke() for pre-C++17 boost-1.78.0.beta1 2021-11-03 18:25:26 +01:00
Peter Dimov
b996250074 Add ABI autodetection logic modeled after the platform one and build/Jamfile 2021-11-03 16:21:18 +02:00
Oliver Kowalke
d70a653fd3 Merge pull request #191 from Helflym/master
asm: adjust XCOFF files for AIX assembler
2021-11-03 11:12:54 +01:00
Clément Chigot
f7272bce6c asm: adjust XCOFF files for AIX assembler
AIX assembler is a bit more strict than GNU assembler. Thus, adjust
the XCOFF asm files to be able to accept both assembler.

For PPC64 jump and make files, most of the work have already been
made recently, only the functions' header needs to be updated.
For PPC64 ontop and PPC32 files, the algorithms where also wrong.
So the whole files have been reworked.

The PPC32 stack layout is based on AIX documentation:
https://www.ibm.com/docs/en/aix/7.2?topic=overview-runtime-process-stack
For PPC64, as it seems to work fine and is already being used in php,
I've kept the current layout based on PPC64 Linux version.

Tested with boost/context, boost/fiber and boost/coroutine2.
Note that the test_sscanf is still failing in ppc32 because of
float precision. (3.13999 is returned instead of 3.14).
2021-11-03 10:54:05 +01:00
Oliver Kowalke
f409fa8f59 Revert "support for spawning fiber managed by boost.asio"
This reverts commit 520128fab2.

revert because of dependency cycle
2021-10-16 10:52:47 +02:00
Oliver Kowalke
cbc3eb1076 Merge pull request #188 from apolukhin/antoshkka/mac-os-fix
restore work with TLS[__PTK_LIBC_DYLD_Unwind_SjLj_Key] on arm aapcs macho
2021-10-02 17:59:48 +02:00
Antony Polukhin
732ec07981 restore work with TLS[__PTK_LIBC_DYLD_Unwind_SjLj_Key] on arm aapcs macho 2021-09-24 11:35:23 +03:00
Oliver Kowalke
520128fab2 support for spawning fiber managed by boost.asio 2021-09-20 12:35:39 +02:00
Oliver Kowalke
9f378e4337 Merge pull request #186 from yhsb2k/develop
Fix build with cmake and gcc
2021-08-22 21:01:09 +02:00
yhsb2k
8c33d10bf4 Fix build with gcc
Without this, asm files passed to gcc with "-c" option (without preprocessing).
It leads to "linker input file unused because linking not done" warnings and
"make_x86_64_ms_pe_gas.asm.obj: No such file or directory" error.
2021-08-22 14:02:35 +03:00
Oliver Kowalke
edf3a873ae Merge pull request #183 from leha-bot/fix/arm-detection
CMake: fix detection of arm/aarch64 (#182)
2021-08-14 17:50:00 +02:00
Oliver Kowalke
f1ab20504e Merge pull request #185 from NattyNarwhal/fix-ppc64-xcoff
Fix 64-bit XCOFF assembly
2021-08-11 21:29:42 +02:00
Calvin Buckley
b701608477 Fix 64-bit XCOFF assembly
It should almost exactly match the ELFv1 ABI code now, except with
IBM assembler syntax.

Tested with PHP fibres. Fixes #180
2021-08-11 15:01:03 -03:00
leha-bot
cf656dcdad CMake: also add MIPS detection
Based on CMAKE_SYSTEM_PROCESSOR and arch bitness.
2021-08-10 15:10:04 +03:00
leha-bot
5c8163d68c CMake: fix detection of arm/aarch64 (#182)
Use CMAKE_SYSTEM_PROCESSOR at first step and if it matches to any
Boost.Context arch option, then we will use it as default arch.
Otherwise we try to detect the known arm names depending on current
bitness.

Fixes #182.
2021-08-10 15:09:41 +03:00
Oliver Kowalke
561a31508f Merge pull request #93 from FlyGoat/mips
Switch mips1 to mips
2021-08-06 07:41:36 +02:00
Oliver Kowalke
c55b58bf0a Merge branch 'develop' into mips 2021-08-06 07:41:02 +02:00
Oliver Kowalke
a21ad512c2 Merge pull request #179 from sdarwin/feature/gha_fix_1
Update GitHub Actions CI file
2021-08-06 07:37:36 +02:00
Oliver Kowalke
2041cfcca1 copy elision in throw expression might not always work
issue 181

The copy elision of `caught` in throw expression is not mandatory,
and when it doesn't happen, forced_unwind::caught remains false
when the temporary is destroyed, which incorrectly triggers the assert.
2021-08-06 07:31:12 +02:00
sdarwin
4ff68601f6 Update GitHub Actions CI file 2021-07-30 16:07:05 +00:00
Oliver Kowalke
8f69d9d03c Merge pull request #178 from eschnett/eschnett/macho-gcc
Allow building asm_sources with GCC on 64-bit MACH-O
boost-1.77.0
2021-07-15 06:44:59 +02:00
Oliver Kowalke
88114692a5 Merge pull request #174 from Kojoley/feature/cease-dependence-on-thread
Cease dependence on Thread
2021-07-15 06:43:20 +02:00
Erik Schnetter
cee39879a3 Allow building asm_sources with GCC on 64-bit MACH-O 2021-07-14 17:24:44 -04:00
Oliver Kowalke
37b761f2b9 fix return value in call/cc example
147
2021-07-13 21:02:33 +02:00