Closed morrisonlevi closed 1 year ago
that looks just like #86 which I thought was fixed and released already; can you make sure the vendored php you are using includes the fix?
FWIW sanitizer might be also confused but the fact that vector operations operate outside their buffers since they obviously have to load aligned chunks of memory with a pointer somewhere in the middle.
Did you mean to link a different issue? As far as I can tell, the stacks look quite different. Even if you meant that issue, the bundled pcre version is 10.42 for the version of PHP I am building, so it should include whatever fix you are referring to as it's the latest released version, yes?
Did you mean to link a different issue?
correct, updated my link; apologies for the confusion.
still, my comment about ASAN stands; AFAIK this is just a buffer over read (affecting aarch64 regardless of OS), which is no reason to crash, as it is expected.
FWIW, all architectures that have SIMD operations enabled (x86, s390x and next release also LoongArch) do the same buffer over reads but since they are done by generated sljit code it is not something that ASAN can "detect".
I'll try the patch later. As far as ASAN is concerned, it can't tell "on purpose" types of ones apart from mistakes, so it makes sense it would complain.
I had some travel, and I'm back now. I expect to try this out next week.
I was able to double-check this today: no warnings, all tests pass 👍🏻
I have struggled to create a simple reproducer for this, but I do have a Dockerfile below. Here is the sanitizer output:
Here is an example backtrace of what PHP was doing:
My toolchain was built with this docker image:
Inside the container, run:
The parallelism of
-j2
is required because it takes a different path downrun-tests.php
.