[PATCH] core/fxcrt/numerics: Fix incorrect preprocessor check on aarch64

27 views
Skip to first unread message

John Paul Adrian Glaubitz

unread,
Nov 30, 2025, 12:28:07 AMNov 30
to pdf...@googlegroups.com
Hi,

the attached patch fixes one of the preprocessor checks to detect AArch64 hosts.

Currently, the code confuses AArch64 with SPARC64 which causes the former to use
unoptimized code while the former will fail to build as the inline assembly emits
the qsub instruction which is not recognized on SPARC64.

I have to post my patch manually instead of using git-send-email as my primary
development email address is a non-GMail email address. This is also my second
attempt to post to this mailing list as my previous mail got lost.

Thanks,
Adrian
0001-core-fxcrt-numerics-Fix-incorrect-preprocessor-check.patch

John Paul Adrian Glaubitz

unread,
Nov 30, 2025, 12:28:08 AMNov 30
to pdfium
Hello,

the attached patch fixes an incorrect preprocessor check that mixes up AArch64 with SPARC64. The relevant information is all in the patch.

I have to post the patch here manually as I cannot use my primary non-GMail email address which I use for open-source development to post on this list, but the patch also contains the proper authorship information.

I have signed Google's CLA as I contributed to various Google project's in the past, so that should be fine as well.

I  have also reported the bug here: https://issues.chromium.org/issues/464091911

Thanks,
Adrian
0001-core-fxcrt-numerics-Fix-incorrect-preprocessor-check.patch

Lei Zhang

unread,
Nov 30, 2025, 12:44:58 AMNov 30
to John Paul Adrian Glaubitz, pdfium
Hi,

PDFium does not use this mailing list for submitting patches. Instead,
follow the process at [1] to upload a change list to
pdfium-review.googlesource.com.

[1] https://chromium.googlesource.com/chromium/src/+/main/docs/contributing.md#Uploading-a-change-for-review
> --
> You received this message because you are subscribed to the Google Groups "pdfium" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pdfium+un...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/pdfium/62e2abe5-70e8-4872-8f2f-2a96cd5b9c77n%40googlegroups.com.

John Paul Adrian Glaubitz

unread,
Nov 30, 2025, 5:54:16 AMNov 30
to Lei Zhang, pdfium
Hi Lei,

On Sat, 2025-11-29 at 21:44 -0800, Lei Zhang wrote:
> PDFium does not use this mailing list for submitting patches. Instead,
> follow the process at [1] to upload a change list to
> pdfium-review.googlesource.com.

I have cloned the pdfium repo using gclient and set everything up according
to the instructions. I have also successfully created Gerrit reviews for V8
in the past.

Unfortunately, the same doesn't work for pdfium. I'm always getting a "401",
no matter what I do:

glaubitz@z6:..google/pdfium> git cl upload
Try:
git cl creds-check
(401) Unauthorized: <!DOCTYPE html><html lang=en><meta charset=utf-8><meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width"><title>Error
401</title><style>*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{color:#222;text-align:unset;margin:7% auto 0;max-width:390px;min-
height:180px;padding:30px 0 15px;}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}pre{white-space:pre-
wrap;}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-
right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-
resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-
image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-
ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-
block;height:54px;width:150px}</style><style>body{max-width:none;margin-top:0}</style><div><a href=//www.google.com><span id=logo aria-label=Google></span></a><p><b>401:
Unauthorized</b><p><pre></pre></div>
glaubitz@z6:..google/pdfium>

Any idea?

Adrian

John Paul Adrian Glaubitz

unread,
Nov 30, 2025, 6:45:01 AMNov 30
to Lei Zhang, pdfium
Hi,

On Sun, 2025-11-30 at 11:54 +0100, John Paul Adrian Glaubitz wrote:
> I have cloned the pdfium repo using gclient and set everything up according
> to the instructions. I have also successfully created Gerrit reviews for V8
> in the past.
>
> Unfortunately, the same doesn't work for pdfium. I'm always getting a "401",
> no matter what I do:

I have logged in using my Yubikey with "git credential-luci login" and I'm getting:

glaubitz@z6:..google/pdfium> git credential-luci info
email=adrian....@googlemail.com
has_rapt=true
glaubitz@z6:..google/pdfium>

But I still cannot upload my change:

glaubitz@z6:..google/pdfium> git cl upload
Try:
git cl creds-check
(401) Unauthorized: <!DOCTYPE html><html lang=en><meta charset=utf-8><meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width"><title>Error
401</title><style>*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{color:#222;text-align:unset;margin:7% auto 0;max-width:390px;min-
height:180px;padding:30px 0 15px;}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}pre{white-space:pre-
wrap;}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-
right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-
resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-
image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-
ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-
block;height:54px;width:150px}</style><style>body{max-width:none;margin-top:0}</style><div><a href=//www.google.com><span id=logo aria-label=Google></span></a><p><b>401:
Unauthorized</b><p><pre></pre></div>
glaubitz@z6:..google/pdfium>

Adrian

Lei Zhang

unread,
Dec 1, 2025, 2:50:18 PMDec 1
to John Paul Adrian Glaubitz, pdfium
Did you try running `git cl creds-check` from your PDFium checkout?
Does it report any issues?

John Paul Adrian Glaubitz

unread,
Dec 1, 2025, 3:01:21 PMDec 1
to Lei Zhang, pdfium
On Mon, 2025-12-01 at 11:50 -0800, Lei Zhang wrote:
> Did you try running `git cl creds-check` from your PDFium checkout?
> Does it report any issues?

Not sure. Here is the output:

glaubitz@z6:..upstream/pdfium> git cl creds-check
This tool will help check your Gerrit authentication.
(Report any issues to https://issues.chromium.org/issues/new?component=1456702&template=2076315)

You don't have a cookie file configured in Git (good).

Checking for SSO helper...

Looks like we are running inside a Gerrit repository,
so we will check your Git configuration for it.
Your global Git email is: glau...@physik.fu-berlin.de

Configuring Gerrit auth for /home/glaubitz/upstream/pdfium
Repo remote is https://pdfium.googlesource.com/pdfium

>>> In your global Git config, we set credential.https://pdfium.googlesource.com.helper='', replacing any existing values
>>> In your global Git config, we appended credential.https://pdfium.googlesource.com.helper='luci' to existing values
>>> In your global Git config, we set credential.https://pdfium.googlesource.com.useHttpPath='yes', replacing any existing values
>>> In your global Git config, we cleared all values for url.sso://pdfium/.insteadOf

We have configured Git to use an OAuth helper.
The OAuth helper requires its own login.
!!! If you haven't yet, run `git credential-luci login` using the same email as Git.
(If you have already done this, you don't need to do it again.)
(However, if you changed your email, you should do this again
to ensure you're using the right account.)

Successfully finished auth configuration check.

However, there are some manual actions that are suggested
(you don't have to re-run this command afterward):
- If you haven't yet, run `git credential-luci login` using the same email as Git.
glaubitz@z6:..upstream/pdfium>

Adrian

Lei Zhang

unread,
Dec 1, 2025, 4:11:28 PMDec 1
to John Paul Adrian Glaubitz, pdfium
Could this be due to your global git email being an fu-berlin.de email
address, while you authenticated with a googlemail.com email address?
Can you try updating your PDFium git checkout to use the same
googlemail.com email address?

John Paul Adrian Glaubitz

unread,
Dec 1, 2025, 4:22:42 PMDec 1
to Lei Zhang, pdfium
On Mon, 2025-12-01 at 13:11 -0800, Lei Zhang wrote:
> Could this be due to your global git email being an fu-berlin.de email
> address, while you authenticated with a googlemail.com email address?

I don't think so. My fu-berlin.de address is set as the preferred email
address in my Gerrit account. I have been able to upload reviews with that
address in the past:

https://chromium-review.googlesource.com/c/v8/v8/+/6563570

So it should work.

> Can you try updating your PDFium git checkout to use the same
> googlemail.com email address?

Well, I don't want to use my GMail address for open-source work. I have been
using my fu-berlin address for that for years with dozens of projects.

I'll try to reach out to some sort of support for Gerrit.

Adrian

Lei Zhang

unread,
Dec 1, 2025, 4:27:16 PMDec 1
to John Paul Adrian Glaubitz, pdfium
On Mon, Dec 1, 2025 at 1:22 PM John Paul Adrian Glaubitz
<adrian....@googlemail.com> wrote:
> On Mon, 2025-12-01 at 13:11 -0800, Lei Zhang wrote:
> > Could this be due to your global git email being an fu-berlin.de email
> > address, while you authenticated with a googlemail.com email address?
>
> I don't think so. My fu-berlin.de address is set as the preferred email
> address in my Gerrit account. I have been able to upload reviews with that
> address in the past:

In that case, maybe try authenticating with the fu-berlin.de account?
Either way, consistently use one account.
If you stil have the v8 checkout that created that CL, try running git
cl creds-check there and see if it reports anything different.

> > Can you try updating your PDFium git checkout to use the same
> > googlemail.com email address?
>
> Well, I don't want to use my GMail address for open-source work. I have been
> using my fu-berlin address for that for years with dozens of projects.
>
> I'll try to reach out to some sort of support for Gerrit.

Sounds like a plan. There's an issue reporting link in the git cl
creds-check output. Hope this issue gets resolved soon.

John Paul Adrian Glaubitz

unread,
Dec 2, 2025, 3:31:35 AMDec 2
to Lei Zhang, pdfium
On Mon, 2025-12-01 at 13:26 -0800, Lei Zhang wrote:
> On Mon, Dec 1, 2025 at 1:22 PM John Paul Adrian Glaubitz
> <adrian....@googlemail.com> wrote:
> > On Mon, 2025-12-01 at 13:11 -0800, Lei Zhang wrote:
> > > Could this be due to your global git email being an fu-berlin.de email
> > > address, while you authenticated with a googlemail.com email address?
> >
> > I don't think so. My fu-berlin.de address is set as the preferred email
> > address in my Gerrit account. I have been able to upload reviews with that
> > address in the past:
>
> In that case, maybe try authenticating with the fu-berlin.de account?
> Either way, consistently use one account.

I don't have a separate Google account for my fu-berlin.de address.

Google's Gerrit instance supports adding multiple email addresses to a single
account and that has worked in the past before. I don't really want to create
a new Google account nor start using my GMail address for open-source work just
to land a one-liner fix.

> > https://chromium-review.googlesource.com/c/v8/v8/+/6563570
> >
> > So it should work.
>
> If you stil have the v8 checkout that created that CL, try running git
> cl creds-check there and see if it reports anything different.

Output is very similar.

> > > Can you try updating your PDFium git checkout to use the same
> > > googlemail.com email address?
> >
> > Well, I don't want to use my GMail address for open-source work. I have been
> > using my fu-berlin address for that for years with dozens of projects.
> >
> > I'll try to reach out to some sort of support for Gerrit.
>
> Sounds like a plan. There's an issue reporting link in the git cl
> creds-check output. Hope this issue gets resolved soon.

I have reported an issue: https://issues.chromium.org/issues/465165100

Adrian
Reply all
Reply to author
Forward
0 new messages