Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Dependency on jazzer.js breaks Linux builds #19297

Closed
wvanrensburg opened this issue Jan 6, 2025 · 5 comments · Fixed by #19307
Closed

[Bug]: Dependency on jazzer.js breaks Linux builds #19297

wvanrensburg opened this issue Jan 6, 2025 · 5 comments · Fixed by #19307

Comments

@wvanrensburg
Copy link

wvanrensburg commented Jan 6, 2025

Attach (recommended) or Link to PDF file

NA

Web browser and its version

NA

Operating system and its version

Linux

PDF.js version

4.9 & 4.10

Is the bug present in the latest PDF.js version?

Yes

Is a browser extension

No

Steps to reproduce the problem

Within Linux...
git clone https://github.com/mozilla/pdf.js.git
npm i
^ Fails here with Error

13.64 npm error code 127
13.64 npm error path /usr/local/pdfjs/pdf.js/node_modules/@jazzer.js/fuzzer
13.64 npm error command failed
13.64 npm error command sh -c prebuild-install --runtime napi || npm run prebuild
13.64 npm error > @jazzer.js/[email protected] prebuild
13.64 npm error > prebuild --runtime napi --backend cmake-js --all --strip --verbose
13.64 npm error prebuild-install warn install No prebuilt binaries found (target=4 runtime=napi arch=arm64 libc= platform=linux)
13.64 npm error sh: 1: prebuild: not found

Link to Jazzer.js filed bug: CodeIntelligenceTesting/jazzer.js#795

What is the expected behavior?

To Build successfully

What went wrong?

Build Failed

Link to a viewer

No response

Additional context

No response

@Snuffleupagus
Copy link
Collaborator

Snuffleupagus commented Jan 6, 2025

@calixteman, @marco-c Has the tests in https://github.com/mozilla/pdf.js/tree/master/test/fuzz generated any warnings from OSS-Fuzz, since I'm not aware of issues referencing it?

If not, I'd question if it's actually worthwhile to even keep these tests in the PDF.js code-base!

@calixteman
Copy link
Contributor

If not, I'd question if it's actually worthwhile to even keep these tests in the PDF.js code-base!

I was wondering exactly the same question...
To answer to your question, I don't think so, as far as I remember we never had any bug reports and I don't know if something is running that stuff somewhere... Maybe @marco-c knows.

@Snuffleupagus
Copy link
Collaborator

Snuffleupagus commented Jan 6, 2025

Additionally, according to its README it seems that Jazzer.js is no longer being maintained (since almost a year) which on its own seems like reason enough to remove these tests.

@Snuffleupagus
Copy link
Collaborator

Additionally, according to its README it seems that Jazzer.js is no longer being maintained (since almost a year) which on its own seems like reason enough to remove these tests.

Even worse, it seems that Jazzer.js is now also causing permanent breakage in the Node.js v23 CI job.

@calixteman
Copy link
Contributor

That stuff never proved that it was useful.
If an image is ill-formatted and if our code doesn't handle the case, then an exception will be thrown and the rendering will be just wrong, but there is no specific risk to generate a sec issue.
So @marco-c and I decided to remove that stuff.
That said if someone is able to prove that it's worth using it then we can make up our mind to add it back.

@Snuffleupagus Snuffleupagus linked a pull request Jan 8, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants