Open Bug 1818380 Opened 2 years ago Updated 2 years ago

[imap-js] InternalError: too much recursion in ImapResponse.jsm:252

Categories

(MailNews Core :: Networking: IMAP, defect)

Thunderbird 112
defect

Tracking

(thunderbird_esr102 unaffected)

REOPENED
112 Branch
Tracking Status
thunderbird_esr102 --- unaffected

People

(Reporter: mkmelin, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Maybe because of a large folder(???) I got
InternalError: too much recursion ImapResponse.jsm:252:24
which is let match = line.match(/[()\[\]" ]/);
https://searchfox.org/comm-central/rev/db81589f13e9d7b1d47c2a466d19b15715dcf277/mailnews/imap/src/ImapResponse.jsm#252

No steps to reproduce atm.

It's in a while loop so for some reason line must be getting the same value over and over again?

I am hitting that each and everytime I use Daily with the new JS code enabled.

STR are:

  1. Start Daily
  2. Look at JS Console

It will reproduce everytime.

I've asked for proper debugging steps on that matter on Matrix, but failed to get any reply.

The steps depends on if you're able to build or not.
For a reproducible case, I would had dump("line=" + line + "\n"); before the line I quoted in comment 0. Then check the native console for output when running it.

Make it more efficient by moving the regex outside of the loop and only doing search (not full match) for what we want.

Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED

I don't have a test case so let's hope this fixes it.
@gerard-majax: since you have it reproducible, please retest once it's in Daily.

Target Milestone: --- → 112 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/d8a10226e8b3
[imap-js] Avoid "InternalError too much recursion" (for very large responses) in ImapResponse.jsm. r=rnons

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED

I still see some with 20230301104821, is it what we expect?

Flags: needinfo?(mkmelin+mozilla)

No that one should have the fix. I'm out of clues atm.

Assignee: mkmelin+mozilla → nobody
Status: RESOLVED → REOPENED
Flags: needinfo?(mkmelin+mozilla)
Resolution: FIXED → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: