Open danog opened 10 months ago
The same segfault also occurs on shutdown in certain conditions even when opcache is disabled (opcache.enable_cli=0).
Actually the issue seems to be unrelated to ASAN, it just always segfaults when compiling with clang
Clang 14 is also affected (which is the version offered by default on ubuntu 22.04)
I don't get exactly the same result as you.
For me, trying to run PHP exits silently with 1 as the exit code. Running it through valgrind, which I normally use to investigate weird crashes, gives:
# valgrind php
==315== Memcheck, a memory error detector
==315== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==315== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==315== Command: php
==315==
### unhandled dwarf2 abbrev form code 0x25
### unhandled dwarf2 abbrev form code 0x25
### unhandled dwarf2 abbrev form code 0x25
### unhandled dwarf2 abbrev form code 0x1b
### unhandled dwarf2 abbrev form code 0x25
### unhandled dwarf2 abbrev form code 0x25
### unhandled dwarf2 abbrev form code 0x25
### unhandled dwarf2 abbrev form code 0x1b
==315== Valgrind: debuginfo reader: ensure_valid failed:
==315== Valgrind: during call to ML_(img_get)
==315== Valgrind: request for range [107074559, +4) exceeds
==315== Valgrind: valid image size of 1069896 for image:
==315== Valgrind: "/usr/lib/php/20210902/imagick.so"
==315==
==315== Valgrind: debuginfo reader: Possibly corrupted debuginfo file.
==315== Valgrind: I can't recover. Giving up. Sorry.
==315==
According to this that might be avoided by Try compiling with -gdwarf-4 instead of just -g
Can you tell me how to pass that flag to clang?
@Danack I suppose just passing it in the CFLAGS and CXXFLAGS envvars should help!
Reproducer Dockerfile:
php.imagick.ini:
Result: