Closed Bug 2028176 Opened 8 months ago Closed 8 months ago

Fix minor GC bugs found by Claude

Categories

(Core :: JavaScript: GC, task, P3)

task

Tracking

()

RESOLVED FIXED
151 Branch
Tracking Status
firefox151 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

(Blocks 1 open bug)

Details

Attachments

(8 external files)

Jan got Claude to audit the GC code which found a number of minor issues. Most were trivial or decent suggestions for improvements.

Blocks: GC.stability
Severity: -- → N/A
Priority: -- → P3

This patch does the following:

  • Remove MallocSizeOf parameter from MarkStack::sizeOfExcludingThis
  • Remove unused IsAboutToBeFinalizedDuringMinorSweep
  • Fix dereference of |cell| before non null assertion in PerformIncrementalPreWriteBarrier

This patch does the following:

  • Don't record memory allocation on OOM in MapAlignedPages
  • Fix GetNumberInRange when max == min and add assertion
  • Make MapAlignedPagesRandom more check for overflow
  • Skip unnecessary unmap in MapAlignedPagesLastDitch on failure

This patch makes the following changes:

  • Make Nursery::allocateZeroedBuffer more defensive and remove unsued overload

This patch does the following:

  • Remove an assertion that doesn't hold any more in AllocSite::initialHeap
  • Fix double counting of missing alloc sites
  • Fix missing case in AllocSiteKindName
  • Assert we only use the optimized alloc size for objects

This patch makes the follow changes:

  • Assert SlotsEdge is valid after merge
  • Add null check when clearing whole cell buffer storage
  • Strengthen assertion in JSLinearString::maybeCloneCharsOnPromotionTyped

It turns out this is no longer used so we can remove it.

This patch does the following:

  • Remove possible UB when calling TraceRange on zero length range
  • Make both pre barrier verifier tracers use the same tracer options
  • Remove duplicate tracing of WeakMap::memberOf also traced by trace() method

This patch makes the following changes:

  • Assert perserve wrapper callback doesn't cause more wrappers to be preserved
  • Handle error from MaybePreserveDOMWrapper
Regressions: 2029515
Regressions: 2030908
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: