Commit 8c20337
authored
[asan] Intercept __makecontext_v2 on Solaris/SPARC (llvm#81588)
As detailed in [GCC PR
sanitizer/113785](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113785),
the GCC test `c-c++-common/asan/swapcontext-test-1.c` `FAIL`s on
Solaris/sparc.
This is due to the fact that Solaris 10/SPARC changed the semantics of
`makecontext` so `ucontext_t.uc_stack.ss_sp` refers to the stack base
address. To maintain binary compatiblity, the external name was changed
to `__makecontext_v2`, keeping the old version.
To match this, `__makecontext_v2` needs to be intercepted instead of
`makecontext`.
Tested on GCC trunk on `sparc-sun-solaris2.11`, `i386-pc-solaris2.11`,
and `x86_64-pc-linux-gnu`.
Also tested on the same targets on LLVM `main`. However, this only
proves that Linux/x86_64 isn't broken, since all `makecontext` tests are
Linux-specific.1 parent 3b6e250 commit 8c20337
1 file changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
355 | 362 | | |
356 | 363 | | |
| 364 | + | |
357 | 365 | | |
358 | 366 | | |
359 | 367 | | |
| |||
373 | 381 | | |
374 | 382 | | |
375 | 383 | | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
376 | 387 | | |
| 388 | + | |
377 | 389 | | |
378 | 390 | | |
379 | 391 | | |
| |||
780 | 792 | | |
781 | 793 | | |
782 | 794 | | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
783 | 799 | | |
| 800 | + | |
784 | 801 | | |
785 | 802 | | |
786 | 803 | | |
| |||
0 commit comments