update ubsan

This commit is contained in:
Michael Kirk 2018-07-18 16:48:02 -06:00
parent 0513077d29
commit 9e348f2a27
7 changed files with 58 additions and 7 deletions

View file

@ -419,6 +419,7 @@
4C20B2B720CA0034001BAC90 /* ThreadViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4542DF51208B82E9007B4E76 /* ThreadViewModel.swift */; };
4C20B2B920CA10DE001BAC90 /* ConversationSearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C20B2B820CA10DE001BAC90 /* ConversationSearchViewController.swift */; };
4C4AEC4520EC343B0020E72B /* DismissableTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C4AEC4420EC343B0020E72B /* DismissableTextField.swift */; };
4C6F527C20FFE8400097DEEE /* SignalUBSan.supp in Resources */ = {isa = PBXBuildFile; fileRef = 4C6F527B20FFE8400097DEEE /* SignalUBSan.supp */; };
4CB5F26720F6E1E2004D1B42 /* MenuActionsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CFF4C0920F55BBA005DA313 /* MenuActionsViewController.swift */; };
4CB5F26920F7D060004D1B42 /* MessageActions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB5F26820F7D060004D1B42 /* MessageActions.swift */; };
4CC0B59C20EC5F2E00CF6EE0 /* ConversationConfigurationSyncOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CC0B59B20EC5F2E00CF6EE0 /* ConversationConfigurationSyncOperation.swift */; };
@ -1084,6 +1085,7 @@
4C13C9F520E57BA30089A98B /* ColorPickerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorPickerViewController.swift; sourceTree = "<group>"; };
4C20B2B820CA10DE001BAC90 /* ConversationSearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConversationSearchViewController.swift; sourceTree = "<group>"; };
4C4AEC4420EC343B0020E72B /* DismissableTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DismissableTextField.swift; sourceTree = "<group>"; };
4C6F527B20FFE8400097DEEE /* SignalUBSan.supp */ = {isa = PBXFileReference; lastKnownFileType = text; path = SignalUBSan.supp; sourceTree = "<group>"; };
4CB5F26820F7D060004D1B42 /* MessageActions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageActions.swift; sourceTree = "<group>"; };
4CC0B59B20EC5F2E00CF6EE0 /* ConversationConfigurationSyncOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConversationConfigurationSyncOperation.swift; sourceTree = "<group>"; };
4CFF4C0920F55BBA005DA313 /* MenuActionsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuActionsViewController.swift; sourceTree = "<group>"; };
@ -2402,6 +2404,7 @@
D221A094169C9E5E00537ABF /* Supporting Files */ = {
isa = PBXGroup;
children = (
4C6F527B20FFE8400097DEEE /* SignalUBSan.supp */,
B6B6C3C419193F5B00C0B76B /* Translations */,
D221A099169C9E5E00537ABF /* main.m */,
D221A095169C9E5E00537ABF /* Signal-Info.plist */,
@ -2754,6 +2757,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4C6F527C20FFE8400097DEEE /* SignalUBSan.supp in Resources */,
34CF078A203E6B78005C4D61 /* end_call_tone_cept.caf in Resources */,
AD83FF3F1A73426500B5C81A /* audio_pause_button_blue.png in Resources */,
34330A5A1E7875FB00DF2FB9 /* fontawesome-webfont.ttf in Resources */,

View file

@ -28,7 +28,7 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B57ACF2237BE640621E2E2CF12637CFE"
BlueprintIdentifier = "13CED0CFD8586E9C6BAC02E581D06068"
BuildableName = "SignalServiceKit.framework"
BlueprintName = "SignalServiceKit"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
@ -83,6 +83,7 @@
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
stopOnEveryUBSanitizerIssue = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
showNonLocalizedStrings = "YES">
@ -102,6 +103,11 @@
value = "disable"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "UBSAN_OPTIONS"
value = "suppressions=SignalUBSan.supp"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "DYLD_PRINT_STATISTICS"
value = "1"

32
Signal/SignalUBSan.supp Normal file
View file

@ -0,0 +1,32 @@
# See https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#runtime-suppressions
# for details.
# protobuf lib
shift-base:CodedInputStream.m
# generated protos
bool:WebSocketResources.pb.m
bool:OWSSignalServiceProtos.pb.m
bool:WhisperTextProtocol.pb.m
bool:OWSWebRTCDataProtos.pb.m
bool:OWSSignaliOSProtos.pb.m
bool:OWSProvisioningProtos.pb.m
bool:OWSFingerprintProtos.pb.m
# YapDatabase
bool:YapDatabaseAutoViewTransaction.m
# SocketRocket
bool:SRWebSocket.m
# Curve25519 expected
shift-base:curve25519-donna.c
shift-base:ge_scalarmult_base.c
shift-base:fe_mul.c
shift-exponent:fe_sq.c
shift-base:fe_sq.c
shift-base:fe_sq2.c
shift-exponent:fe_sq2.c
shift-base:fe_tobytes.c
shift-exponent:fe_tobytes.c
shift-base:sc_reduce.c
shift-exponent:sc_reduce.c

View file

@ -75,9 +75,13 @@ int const OWSLinkedDevicesTableViewControllerSectionAddDevice = 1;
{
[super viewWillAppear:animated];
[self refreshDevices];
// HACK to unselect rows when swiping back
// http://stackoverflow.com/questions/19379510/uitableviewcell-doesnt-get-deselected-when-swiping-back-quickly
[self.tableView deselectRowAtIndexPath:[self.tableView indexPathForSelectedRow] animated:animated];
NSIndexPath *_Nullable selectedPath = [self.tableView indexPathForSelectedRow];
if (selectedPath) {
// HACK to unselect rows when swiping back
// http://stackoverflow.com/questions/19379510/uitableviewcell-doesnt-get-deselected-when-swiping-back-quickly
[self.tableView deselectRowAtIndexPath:selectedPath animated:animated];
}
}
- (void)viewWillDisappear:(BOOL)animated

View file

@ -43,6 +43,7 @@ const CGFloat OWSMessageHeaderViewDateHeaderVMargin = 23;
OWSAssert(!self.titleLabel);
self.layoutMargins = UIEdgeInsetsZero;
self.layoutConstraints = @[];
// Intercept touches.
// Date breaks and unread indicators are not interactive.

View file

@ -77,6 +77,7 @@ typedef void (^SystemMessageActionBlock)(void);
self.layoutMargins = UIEdgeInsetsZero;
self.contentView.layoutMargins = UIEdgeInsetsZero;
self.contentView.backgroundColor = UIColor.whiteColor;
self.layoutConstraints = @[];
self.headerView = [OWSMessageHeaderView new];
self.headerViewHeightConstraint = [self.headerView autoSetDimension:ALDimensionHeight toSize:0];

View file

@ -847,9 +847,12 @@ const CGFloat kIconViewLength = 24;
{
[super viewWillAppear:animated];
// HACK to unselect rows when swiping back
// http://stackoverflow.com/questions/19379510/uitableviewcell-doesnt-get-deselected-when-swiping-back-quickly
[self.tableView deselectRowAtIndexPath:[self.tableView indexPathForSelectedRow] animated:animated];
NSIndexPath *_Nullable selectedPath = [self.tableView indexPathForSelectedRow];
if (selectedPath) {
// HACK to unselect rows when swiping back
// http://stackoverflow.com/questions/19379510/uitableviewcell-doesnt-get-deselected-when-swiping-back-quickly
[self.tableView deselectRowAtIndexPath:selectedPath animated:animated];
}
[self updateTableContents];
}