Commit 9dcfaa3
committed
pythongh-149202: Fix frame pointer unwinding on s390x and ARM
-fno-omit-frame-pointer is not enough to make every target walkable by
the simple manual frame pointer unwinder.
On s390x, GCC does not emit a usable backchain unless -mbackchain is
also enabled. Without it, the unwinder stops at the current C frame and
the test reports no Python frames. s390x also keeps the return address
in the caller-provided register save area rather than at fp[1], so read
it from the architecture frame layout.
On 32-bit ARM, GCC defaults to Thumb mode on common armhf toolchains.
The Thumb prologue keeps the saved frame pointer and link register at
offsets that depend on the generated frame, which breaks the fp[0]/fp[1]
walk used by the helper. Use -marm when it is supported for
frame-pointer builds, and teach the helper the GCC ARM-mode saved-fp and
saved-lr slots.1 parent 3efd2f4 commit 9dcfaa3
7 files changed
Lines changed: 171 additions & 23 deletions
File tree
- Doc
- howto
- using
- whatsnew
- Misc/NEWS.d/next/Core_and_Builtins
- Modules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
223 | 225 | | |
224 | 226 | | |
225 | 227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
784 | 784 | | |
785 | 785 | | |
786 | 786 | | |
787 | | - | |
788 | | - | |
789 | | - | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
790 | 792 | | |
791 | 793 | | |
792 | 794 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2305 | 2305 | | |
2306 | 2306 | | |
2307 | 2307 | | |
2308 | | - | |
2309 | | - | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
2310 | 2311 | | |
2311 | 2312 | | |
2312 | 2313 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
4 | 5 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
328 | 371 | | |
329 | 372 | | |
330 | 373 | | |
| |||
348 | 391 | | |
349 | 392 | | |
350 | 393 | | |
351 | | - | |
| 394 | + | |
| 395 | + | |
352 | 396 | | |
353 | 397 | | |
354 | 398 | | |
| |||
362 | 406 | | |
363 | 407 | | |
364 | 408 | | |
365 | | - | |
366 | | - | |
367 | | - | |
| 409 | + | |
| 410 | + | |
368 | 411 | | |
369 | 412 | | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | 413 | | |
382 | 414 | | |
383 | 415 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2548 | 2548 | | |
2549 | 2549 | | |
2550 | 2550 | | |
| 2551 | + | |
| 2552 | + | |
| 2553 | + | |
| 2554 | + | |
| 2555 | + | |
| 2556 | + | |
| 2557 | + | |
| 2558 | + | |
| 2559 | + | |
| 2560 | + | |
2551 | 2561 | | |
2552 | 2562 | | |
2553 | 2563 | | |
| |||
0 commit comments