Commit 2229d52
committed
gnugrep: iOS stackvma stub for vendored gnulib
gnugrep bundles gnulib's lib/stackvma.c, which introspects Mach VM
regions to implement stack-overflow detection for libsigsegv. Its
platform gate `#if defined __APPLE__ && defined __MACH__` fires on
both macOS and iOS, but the macOS arm includes `<libc.h>` and
`<nlist.h>` — BSD convenience headers Xcode ships on macOS only.
Note: `<libc.h>` here is a macOS-specific grab-bag header that
re-exports misc BSD extensions, *not* the standard C library
(`<stdlib.h>`, `<string.h>`, etc., which iOS ships normally).
`--without-libsigsegv-prefix` only disables linking against external
libsigsegv; it doesn't exclude the vendored stackvma from the build.
Replace stackvma.c with a stub `sigsegv_get_vma` returning -1 ("no
info"). iOS sandboxes forbid mach task/vm introspection anyway, so
stack-overflow detection would never work there; the stub matches
reality.1 parent fa398d4 commit 2229d52
2 files changed
Lines changed: 33 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| |||
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
66 | 75 | | |
67 | 76 | | |
68 | 77 | | |
| |||
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
0 commit comments