MFH: r553570

devel/llvm10: really fix the AT_EXECPATH fallback =(

It turns out that I made not one but *two* mistakes in applying this patch
from the version that I had sent upstream. This one is not an extra
semicolon, but rather not dereferencing p... p may never hit AT_NULL, but *p
certainly will.

The problem was isolated and the fix identified + tested by Andrew Gierth.

Reported by:	Andrew Gierth <andrew_tao173 riddles org uk>

Approved by:	ports-secteam (blanket: runtime fix)
This commit is contained in:
Kyle Evans 2020-10-29 00:00:42 +00:00
parent 49ede1522b
commit 41f639ce8a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2020Q4/; revision=553571

View File

@ -7,7 +7,7 @@
- for (;;) {
- switch (*(uintptr_t *)p++) {
- case AT_EXECPATH:
+ for (; (uintptr_t *)p != AT_NULL; p++) {
+ for (; *(uintptr_t *)p != AT_NULL; p++) {
+ if (*(uintptr_t *)p++ == AT_EXECPATH)
return *p;
- case AT_NULL: