About official apk repo php81 segmentation fault
- Dominant language
- C
- Stars
- 20.5k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
I'm not sure if this issue should ask here. But it seems just happen in ish (or Alpine Linux).
I have an issue on php81 which installed from official apk repo. I changed the apk repo by following the links:
https://github.com/ish-app/ish/wiki/Using-Alpine-Linux-repositories
And when I tried to install composer from link `https://getcomposer.org/download/`, I got "Segmentation fault". After some investigation, the problem is from code that including "===" with "getenv" or "strpos", like:
`if ('Hyper' === getenv('TERM_PROGRAM')) {`
But only "===", "getenv" or "strpos" will not trigger segmentation fault.
Before trying official repo, I use ish self repo to install php8, which can perfectly install composer.
Since I have no any clue on which party should ask, I just raise the question here to see if someone can help me. Thanks
System Info:
Device: iPad air 5
iPadOS: 17.5.1
ish version: 1.3.2 AppStore version
Procedure to reproduce:
1) mv /ish /ish_bak
2) vi /etc/apk/repositories
```
# This file contains pinned repositories managed by iSH. If the /ish directory
# exists, iSH uses the metadata stored in it to keep this file up to date (by
# overwriting the contents on boot
#http://apk.ish.app/v3.14-2023-05-19/main
#http://apk.ish.app/v3.14-2023-05-19/community
https://dl-cdn.alpinelinux.org/alpine/v3.19/main
https://dl-cdn.alpinelinux.org/alpine/v3.19/community
```
3) apk update && apk upgrade && apk fix
4) apk add php81
5) apk add php81-curl
6) apk add php81-openssl
7) php81 -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
8) php81 -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
9) php81 composer-setup.php
Segmentation fault will triggered when running point 9
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the reproduction steps, especially /etc/apk/repositories and the php81 composer-setup.php command that segfaults. Compare the behavior of the official Alpine packages with the iSH self-repository packages, then determine which component owns the failure and document a reproducible result or confirmed fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, ios, linux, php
- Domain
- mobile-dev, operating-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100