-
Notifications
You must be signed in to change notification settings - Fork 24.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable Address and Undefined Behavior Sanitizers (#36443)
Summary: This change does two things: 1) Moves RNTester on iOS to use an `.xctestplan` to configure its tests. This moves the test configuration out of the `.xcscheme` file, and into a new json file that Xcode likes. It also allows you to run the same tests multiple times with different configurations. This was done by clicking the focused button below. ![image](https://user-images.githubusercontent.com/6722175/224447314-49d460e9-d2d6-4ec9-9767-64c2a1c449c0.png) Note: this is partially me upstreaming a change from React Native macOS (microsoft#190), though at some point our Xcode project got messed up and we were no longer referencing them ��. 2) Enables Address Sanitizer and Udefined Behavior Sanitizer through the xctestplan This should help catch some extra vulnerabilities should they ever show up while our tests run. Notably, I did not _also_ add a configuration to run Thread Sanitizer, because tests start failing with that enabled 😅. ## Changelog: [IOS] [SECURITY] - Enable Address and Undefined Behavior Sanitizers on RNTester Pull Request resolved: #36443 Test Plan: CI should pass Reviewed By: cortinico Differential Revision: D44213517 Pulled By: cipolleschi fbshipit-source-id: 0646174c4b416413a563e8178aa2cfca230b5e66
- Loading branch information
1 parent
cd65a32
commit 65e61f3
Showing
5 changed files
with
61 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"configurations" : [ | ||
{ | ||
"id" : "1D5134C7-450A-44B6-A8B1-13CD24FD50B9", | ||
"name" : "Address Sanitizer", | ||
"options" : { | ||
"addressSanitizer" : { | ||
"detectStackUseAfterReturn" : true, | ||
"enabled" : true | ||
} | ||
} | ||
} | ||
], | ||
"defaultOptions" : { | ||
"codeCoverage" : false, | ||
"environmentVariableEntries" : [ | ||
{ | ||
"key" : "CI_USE_PACKAGER", | ||
"value" : "1" | ||
} | ||
], | ||
"targetForVariableExpansion" : { | ||
"containerPath" : "container:RNTesterPods.xcodeproj", | ||
"identifier" : "13B07F861A680F5B00A75B9A", | ||
"name" : "RNTester" | ||
}, | ||
"undefinedBehaviorSanitizerEnabled" : true | ||
}, | ||
"testTargets" : [ | ||
{ | ||
"target" : { | ||
"containerPath" : "container:RNTesterPods.xcodeproj", | ||
"identifier" : "E7DB215222B2F332005AC45F", | ||
"name" : "RNTesterIntegrationTests" | ||
} | ||
}, | ||
{ | ||
"target" : { | ||
"containerPath" : "container:RNTesterPods.xcodeproj", | ||
"identifier" : "E7DB209E22B2BA84005AC45F", | ||
"name" : "RNTesterUnitTests" | ||
} | ||
} | ||
], | ||
"version" : 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters