Skip to content

Commit ccbf04d

Browse files
committed
Move the string and other tags in pointers to the second byte because Android enabled memory tagging
- pull request swiftlang/swift#40779 - log A/SwiftRuntime: Swift/UnicodeHelpers.swift:266: Fatal error: No foreign strings on Linux in this version of Swift A/libc: Fatal signal 5 (SIGTRAP), code 1 (TRAP_BRKPT), fault addr 0x7102456948 in tid 10696 (ts.todomvvmlive), pid 10696 (ts.todomvvmlive)
1 parent c7d523c commit ccbf04d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

todoapp/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
88

99
<application
10+
android:allowNativeHeapPointerTagging="false"
1011
android:allowBackup="false"
1112
android:icon="@mipmap/ic_launcher"
1213
android:label="@string/app_name"

todoapp/app/src/main/swift/Sources/TodoCore/TaskRepository.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public class TasksRepository {
7676
ScopedNativeTraceSection.endTrace("android_swift_systrace_demo")
7777

7878
let db = SQLiteDB()
79-
let isOpened = db.open(dbPath: "/sdcard/test123.db")
79+
let isOpened = db.open(dbPath: "/data/data/com.example.android.architecture.blueprints.todomvvmlive/cache/test123.db")
8080
AndroidLogcat.w(TasksRepository.TAG, "isOpened = \(isOpened)")
8181
let category1 = Category(db: db)
8282
category1.name = "My New Category1"

0 commit comments

Comments
 (0)