Commit ea49c4a
Luca Toniolo
Deprecate uses_fp: always enable FPU state save on all threads
GCC on x86-64 may emit SSE instructions (e.g. for struct zeroing)
even in functions that don't explicitly use floating point. On RTAI,
threads created with uses_fp=0 skip FPU/SSE state save/restore,
silently corrupting XMM registers of other Linux processes and
causing heap corruption and system crashes.
Fix by always enabling FPU state save regardless of the uses_fp
parameter:
- rtai_rtapi.c: always pass 1 to rt_task_init_cpuid
- hal_lib.c: override uses_fp=0 to 1 in hal_create_thread
- hal_lib.c: remove addf FP compatibility check (now meaningless)
Emit deprecation warnings when uses_fp=0 is requested.
Ref: #38951 parent 8ef8e16 commit ea49c4a
2 files changed
+19
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1917 | 1917 | | |
1918 | 1918 | | |
1919 | 1919 | | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
1920 | 1926 | | |
1921 | 1927 | | |
1922 | 1928 | | |
| |||
2202 | 2208 | | |
2203 | 2209 | | |
2204 | 2210 | | |
2205 | | - | |
2206 | | - | |
2207 | | - | |
2208 | | - | |
2209 | | - | |
2210 | | - | |
2211 | | - | |
| 2211 | + | |
| 2212 | + | |
2212 | 2213 | | |
2213 | 2214 | | |
2214 | 2215 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
685 | 685 | | |
686 | 686 | | |
687 | 687 | | |
688 | | - | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
689 | 698 | | |
690 | | - | |
| 699 | + | |
691 | 700 | | |
692 | 701 | | |
693 | 702 | | |
| |||
0 commit comments