Closed Bug 1707853 Opened 5 years ago Closed 5 years ago

Crash in [@ memcpy | nsJARInputStream::Read] - exception handling still not working

Categories

(Core :: Networking: JAR, defect, P1)

defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox-esr78 --- wontfix
firefox88 --- wontfix
firefox89 + fixed
firefox90 + fixed

People

(Reporter: valentin, Assigned: valentin)

References

Details

(Whiteboard: [necko-triaged])

Crash Data

Attachments

(2 files)

It seems the CopyMemory hack in bug 1551562 doesn't work for EXCEPTION_IN_PAGE_ERROR for reasons I don't understand.
I did a test with std::copy and this one seems to work. I also managed to write a unit test that needs some manual interaction to work, but it's still better than nothing.

This test is for documentation purposes only.
With some work we may be able to automate it, but sharing folders on windows seems to require elevated priviledges.

Depends on D113497

Attachment #9218618 - Attachment description: Bug 1707853 - Skipped unit test for documentation purposes r=#necko → Bug 1707853 - Add always-skipped unit test for documentation purposes r=#necko
Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/0ddb01633b9f Use std::copy instead of memcpy to ensure exception handling works r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/2c5a50fb4d4e Add always-skipped unit test for documentation purposes r=necko-reviewers,dragana

[Tracking Requested - why for this release]:
Turns out the fix we did in bug 1551562 didn't fix the issue.
This one seems to work a little better - and has a test we can use to verify the fix.
Additionally I need to test this in a Win7 VM too, since most of the crashes happen on x86 Win7.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
Crash Signature: [@ memcpy | nsJARInputStream::Read] [@ memcpy_repmovs | nsJARInputStream::Read ] [@ vcruntime140.dll | nsJARInputStream::Read ] [@ vcruntime140.dll | `anonymous namespace'::VerifyAppManifest] [@ nsJARInputStream::Read ]

Comment on attachment 9218617 [details]
Bug 1707853 - Use std::copy instead of memcpy to ensure exception handling works r=#necko

Beta/Release Uplift Approval Request

  • User impact if declined: Avoidable crashes in nsJARInputStream::Read will continue.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Since the crashes rarely/never happen on Nightly and this release cycle will be longer it would be better to verify it on Beta.
    The risk is low - we replace memcpy/CopyMemory with std::copy which should have similar performance but also the ability to throw/catch exceptions, which we need to prevent these crashes.
  • String changes made/needed:
Attachment #9218617 - Flags: approval-mozilla-beta?
Attachment #9218618 - Flags: approval-mozilla-beta?

Comment on attachment 9218617 [details]
Bug 1707853 - Use std::copy instead of memcpy to ensure exception handling works r=#necko

Approved for 89.0b6, thanks.

Attachment #9218617 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9218618 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: