Xcode Sanitizers and Runtime Issues

RSS for tag

Xcode Runtime Issues are reports of programming errors found at run time. Issues can be found by variety of tools, including Address Sanitizer (ASan), Main Thread Checker (MTC), Thread Sanitizer (TSan), and Undefined Behavior Sanitizer (UBSan).

Posts under Xcode Sanitizers and Runtime Issues tag

30 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Compiling XNU with HWASan (KASAN) on macOS arm64e
Hello, I'm trying to build XNU with KASAN support. However I get error: clang: error: unsupported option '-fsanitize=kernel-hwaddress' for target 'arm64e-apple-darwin23.2.0' If I try to compile a non-kernel C code with -fsanitize=hwaddress, I get the same target error. But Apple ships HWASan kernels with KDK, which shows there is a clang which is capable of compiling hwasan code for arm64e. How can we compile hwasan sanitized code ourselves? Is it a private toolchain or released somewhere?
0
0
551
Jan ’24
SwiftUI Textfield Error
Hi! I noticed that when I use the simple Textfield in SwiftUI it generates unexpected error: -[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID Error: this application, or a library it uses, has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API and this value is being ignored. Please fix this problem. If you want to see the backtrace, please set CG_NUMERICS_SHOW_BACKTRACE environmental variable. Here is the code example to repoduce the error: import SwiftUI struct ContentView: View { @State private var firstName = "" var body: some View { TextField("First name", text: $firstName) } } How it could be fixed ? Is it one of the bugs that came along with iOS 17 ? Thank you!
1
0
2.2k
Dec ’23
Can no longer start iOS app on MacOS via XCode
I'm writing here because I'm out of ideas now, I allow my iOS app to be used on macOS and previously I was able to launch my app via XCode and perform debugging but suddenly I'm not able to launch my app anymore (I updated my OS (12.6) and my XCode (14.0.1) in the meantime). When I start it I see the icon but then it immediately crashes with following error in the output AddressSanitizer: CHECK failed: sanitizer_mac.cpp:1231 "((ret_value)) <= (((1ULL << 36)))" ... AddressSanitizer: CHECK failed: sanitizer_mac.cpp:1231 "((ret_value)) <= (((1ULL << 36)))" ... (lldb)  I can't even put a breakpoint anywhere as my code doesn't even get executed. I tried a test project and it works there but my project doesn't start up even though it works perfectly fine on iOS/ tvOS and on iPads. How can I fix this error or what's exactly the problem?
3
2
1.5k
Nov ’23
Address Sanitizer reports error whenever a C++ exception is caught
Dear Experts, When I try to use Address Sanitizer on my iOS app, it reports "attempting free on address which was not malloc()-ed" whenever a C++ exception is caught. If first saw it inside Apple's libFontParser and filed FB13271831, but I now see it in my own code. The Address Sanitizer stack trace always starts like this: #1 0x215766ae8 in __cxa_decrement_exception_refcount+0x40 (/usr/lib/libc++abi.dylib:arm64e+0x13ae8) Having looked up __cxa_decrement_exception_refcount in the C++ ABI docs, my guess is that the C++ runtime is creating and destroying the exception objects in some way that Address Sanitizer doesn't properly understand, causing it to think that they are being freed without having been allocated by malloc. This is only really a problem because it does not seem possible to continue after ASan has reported this error; the app is terminated. Question: is there a way to tell Address Sanitiser to ignore errors in this function? And/or, is there a way to continue after the error? Thanks.
5
0
1.2k
Nov ’23
Could not find bundle inside /Library/Developer/CommandLineTools under scntool.
I am using Xcode 14.3 and when Issue that says "Could not find bundle inside /Library/Developer/CommandLineTools under scntool". I searched this up and tried reinstalling CommandLineTools, reinstalling xcode, and reseting xcode. Here are screenshots of the issue: https://docs.google.com/document/d/1H6HsoZoJhISMo-5cXG-kN0hat6jftcujL1iYK2TRkeA/edit And here is the code: https://github.com/EnderRobber101/Xcode Is there a solution? Please inform me of the solution. Thank you for reading.
3
2
1.6k
Sep ’23
Simple Textfield error: Error for queryMetaDataSync: 2
Hi! I am getting the next warning returned when the textfield is focused. Xcode version: 14.3.1. Should I ignore it ? 2023-09-06 20:55:04.483056+0200 Delete1[6598:29619] [Query] Error for >queryMetaDataSync: 2 2023-09-06 20:55:04.487287+0200 Delete1[6598:29619] [Query] Error for >queryMetaDataSync: 2 2023-09-06 20:55:04.974905+0200 Delete1[6598:30000] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x6000026e3f60> F8BB1C28-BAE8-11D6-9C31-00039315CD46 import SwiftUI struct ContentView: View { @State private var username: String = "" @FocusState private var usernameInFocus: Bool var body: some View { VStack { TextField("Addd", text: $username) .focused($usernameInFocus) .padding(.leading) .frame(height:55) .frame(maxWidth: .infinity) .background(Color.gray.brightness(0.3)) .cornerRadius(10) Button("toggle"){ usernameInFocus.toggle() } } .padding(44) } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }
3
0
2.6k
Sep ’23