You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
unreachable program point: mime_content_type() #17164
This doesn't reproduce on my system (Linux). What OS did you use, and what configuration options did you use? I tried debug builds with both GCC and Clang, and also tried a release build with GCC.
@nielsdos This is the release version of 8.4.1 with only the "--enable-undefined-sanitizer" option on Ubuntu 22.04. Oddly, this only seems to trigger inside of a Singularity container. @cmb69 I have a stupid question... how?
Can you please retry on the last PHP-8.4 branch with a debug build and UBSAN?
You can then enable UBSAN stacktraces using an environment variable. I.e. export UBSAN_OPTIONS="print_stacktrack=true"
The only way this assertion could be triggered is that either lseek(2) fails (returns -1), or that the stream is not already zero-positioned. Neither should happen.
Anyhow, I don't think this is particularly related to ext/fileinfo; the following should likely behave the same:
Activity
cmb69 commentedon Dec 15, 2024
Apparently, the following assertion is hit:
php-src/main/streams/plain_wrapper.c
Line 290 in 0454901
I cannot reproduce on Windows, probably due to
php-src/ext/fileinfo/fileinfo.c
Lines 393 to 400 in 0454901
ndossche commentedon Dec 15, 2024
This doesn't reproduce on my system (Linux). What OS did you use, and what configuration options did you use? I tried debug builds with both GCC and Clang, and also tried a release build with GCC.
cmb69 commentedon Dec 15, 2024
It could also be helpful to see the stack backtrace.
chongwick commentedon Dec 17, 2024
@nielsdos This is the release version of 8.4.1 with only the "--enable-undefined-sanitizer" option on Ubuntu 22.04. Oddly, this only seems to trigger inside of a Singularity container.
@cmb69 I have a stupid question... how?
ndossche commentedon Dec 17, 2024
Can you please retry on the last PHP-8.4 branch with a debug build and UBSAN?
You can then enable UBSAN stacktraces using an environment variable. I.e.
export UBSAN_OPTIONS="print_stacktrack=true"chongwick commentedon Dec 18, 2024
8.4.2 ubsan debug:
ubsanphp842: /home/dan/php-src/main/streams/plain_wrapper.c:290: _php_stream_fopen_from_fd: Assertion `lseek(self->fd, 0, 1) == 0' failed.
Aborted (core dumped)
(There was no further output from stack trace)
cmb69 commentedon Dec 18, 2024
The only way this assertion could be triggered is that either
lseek(2)fails (returns -1), or that the stream is not already zero-positioned. Neither should happen.Anyhow, I don't think this is particularly related to ext/fileinfo; the following should likely behave the same:
chongwick commentedon Dec 18, 2024
It does. Also, var_dump() is not necessary in either case.
ndossche commentedon Dec 18, 2024
The container that @chongwick is probably crucial. Likely some sort of security mechanism is preventing seeking on that.
chongwick commentedon Dec 18, 2024
@nielsdos I would say not the container rather the cluster.
ndossche commentedon Oct 25, 2026
We never managed to reproduce this and there's not enough info to replicate the environment to be able to replicate this. Closing as non-reproducible.