Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About official apk repo php81 segmentation fault #2433

Open
raymond-pineapple opened this issue Jul 25, 2024 · 0 comments
Open

About official apk repo php81 segmentation fault #2433

raymond-pineapple opened this issue Jul 25, 2024 · 0 comments

Comments

@raymond-pineapple
Copy link

raymond-pineapple commented Jul 25, 2024

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
  1. apk update && apk upgrade && apk fix
  2. apk add php81
  3. apk add php81-curl
  4. apk add php81-openssl
  5. php81 -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
  6. php81 -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
  7. php81 composer-setup.php

Segmentation fault will triggered when running point 9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants