Superwall-iOS icon indicating copy to clipboard operation
Superwall-iOS copied to clipboard

[BUG] Data race in SuperwallKit.Superwall.internallyRegister (reported by thread sanitizer)

Open tkafka opened this issue 5 months ago • 1 comments

General information

  • Superwall version: 4.8.1
  • iOS version(s): iOS 26
  • CocoaPods/Carthage version (if applicable):
  • Xcode version: Xcode 26
  • Devices/Simulators affected: iOS 26 simulator
  • Reproducible in the demo project? (Yes/No):
  • Related issues:

Describe the bug

When running my app with Thread sanitizer, Xcode reports

Data race in SuperwallKit.Superwall.internallyRegister(placement: Swift.String, params: Swift.Optional<Swift.Dictionary<Swift.String, Any>>, handler: Swift.Optional<SuperwallKit.PaywallPresentationHandler>, feature: Swift.Optional<() -> ()>) -> () at 0x12076edc0

on line https://github.com/superwall/Superwall-iOS/blob/a24f12279c985ea08035f7477b53c273f71e76f2/Sources/SuperwallKit/Paywall/Presentation/PublicPresentation.swift#L114

Steps to reproduce

For me it's just running the app with thread sanitizer

Other Information

e.g. stacktraces, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.

tkafka avatar Sep 16 '25 07:09 tkafka

I tried this but I don't see any issue appearing. Can you reproduce this with our example app? And is there anything specific about the way you're calling register in your app?

yusuftor avatar Sep 23 '25 13:09 yusuftor