• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Instagram / IGListKit / 25202427585
99%
master: 100%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 01 May 2026 04:41AM UTC
Jobs 1
Files 54
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 May 2026 04:33AM UTC coverage: 98.816%. Remained the same
25202427585

push

github

meta-codesync[bot]
Fix heap corruption crash from concurrent array mutation during diff (#1578)

Summary:
Fixes https://github.com/Instagram/IGListKit/issues/1578

Callers of `IGListDiff`/`IGListDiffPaths` may pass `NSMutableArray` instances backed by collections that are mutated on other threads. Because the diffing algorithm uses `__unsafe_unretained` pointers internally for performance, concurrent mutation can cause use-after-free heap corruption — typically manifesting as:

```
malloc: Incorrect checksum for freed object: probably modified after being freed.
```

inside `std::deque::push_back` during the entry `oldIndexes` stack growth.

This change adds `[oldArray copy]` and `[newArray copy]` at the top of `IGListDiffing()`. For immutable `NSArray` inputs this is a no-op retain with zero overhead. For `NSMutableArray` inputs it creates an immutable snapshot, narrowing the race window from the entire O(n+m) diff to just the `-copy` call.

This is a best-effort mitigation — callers are still responsible for not mutating the source array concurrently since `-[NSMutableArray copy]` itself is not atomic.

Differential Revision: D101205956

fbshipit-source-id: 514ebbef1

2 of 2 new or added lines in 1 file covered. (100.0%)

4508 of 4562 relevant lines covered (98.82%)

703.73 hits per line

Jobs
ID Job ID Ran Files Coverage
1 iOS - 25202427585.1 01 May 2026 04:41AM UTC 59
98.69
GitHub Action Run
Source Files on build 25202427585
  • Tree
  • List 54
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25202427585
  • 54605c07 on github
  • Prev Build on main (#24539907142)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc