Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TestToolChainDemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
dsq
TestToolChainDemo
Commits
6ab0afea
Commit
6ab0afea
authored
Apr 05, 2026
by
qq_38816927
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
10层复杂对象优化
parent
b6539f43
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
3 deletions
+29
-3
TestLog.android.kt
...rc/androidMain/kotlin/com.dong.demo013/TestLog.android.kt
+3
-0
App.kt
composeApp/src/commonMain/kotlin/com.dong.demo013/App.kt
+4
-2
TestLog.kt
composeApp/src/commonMain/kotlin/com.dong.demo013/TestLog.kt
+5
-1
TestLog.ios.kt
...oseApp/src/iosMain/kotlin/com.dong.demo013/TestLog.ios.kt
+3
-0
TestLog.ohosArm64.kt
...hosArm64Main/kotlin/com.dong.demo013/TestLog.ohosArm64.kt
+6
-0
TestLog.ohosX64.kt
...rc/ohosX64Main/kotlin/com.dong/demo013/TestLog.ohosX64.kt
+7
-0
libkn_api.h
harmonyApp/entry/src/main/cpp/include/libkn_api.h
+1
-0
No files found.
composeApp/src/androidMain/kotlin/com.dong.demo013/TestLog.android.kt
View file @
6ab0afea
...
...
@@ -11,3 +11,6 @@ actual fun pirntRandomHiLog() {
actual
fun
testArkTsToKotin
()
{
}
actual
fun
triggerANRByInfiniteLoop
()
{
}
\ No newline at end of file
composeApp/src/commonMain/kotlin/com.dong.demo013/App.kt
View file @
6ab0afea
...
...
@@ -24,6 +24,7 @@ import com.dong.demo013.navigation.ComposeGroup
import
com.dong.demo013.navigation.Page
import
com.dong.maxhap.demos.FaultLogDemo
import
com.dong.maxhap.demos.NativeFaultDemo
import
kotlin.native.concurrent.ThreadLocal
@Composable
internal
fun
App
()
{
...
...
@@ -110,7 +111,7 @@ internal fun HomeScreen(
}
Button
(
onClick
=
{
//
无限递归 - 栈溢出
//
触发卡死
val
testInfinite
:
Boolean
=
true
;
fun
infinite
():
Int
=
infinite
()
+
1
infinite
()
// 触发 StackOverflowError
...
...
@@ -350,3 +351,4 @@ internal fun DemoScreen(
}
}
}
composeApp/src/commonMain/kotlin/com.dong.demo013/TestLog.kt
View file @
6ab0afea
...
...
@@ -11,3 +11,7 @@ expect fun pirntRandomHiLog();
expect
fun
testArkTsToKotin
();
//稳定触发鸿蒙卡死
expect
fun
triggerANRByInfiniteLoop
();
\ No newline at end of file
composeApp/src/iosMain/kotlin/com.dong.demo013/TestLog.ios.kt
View file @
6ab0afea
...
...
@@ -12,3 +12,6 @@ actual fun pirntRandomHiLog() {
actual
fun
testArkTsToKotin
()
{
}
actual
fun
triggerANRByInfiniteLoop
()
{
}
\ No newline at end of file
composeApp/src/ohosArm64Main/kotlin/com.dong.demo013/TestLog.ohosArm64.kt
View file @
6ab0afea
...
...
@@ -55,3 +55,9 @@ actual fun pirntRandomHiLog(){
actual
fun
testArkTsToKotin
()
{
print
(
"测试ArkTs至Kotlin单向跳转"
)
}
actual
fun
triggerANRByInfiniteLoop
()
{
while
(
true
){
}
}
\ No newline at end of file
composeApp/src/ohosX64Main/kotlin/com.dong/demo013/TestLog.ohosX64.kt
View file @
6ab0afea
package
com.dong.demo013
import
kotlinx.cinterop.ExperimentalForeignApi
import
platform.ohos.OH_LOG_Print
import
platform.posix.usleep
import
kotlin.experimental.ExperimentalNativeApi
@OptIn
(
kotlinx
.
cinterop
.
ExperimentalForeignApi
::
class
,
kotlin
.
experimental
.
ExperimentalNativeApi
::
class
)
...
...
@@ -54,3 +55,9 @@ actual fun pirntRandomHiLog(){
actual
fun
testArkTsToKotin
()
{
print
(
"测试ArkTs至Kotlin单向跳转"
)
}
actual
fun
triggerANRByInfiniteLoop
()
{
while
(
true
){
}
}
\ No newline at end of file
harmonyApp/entry/src/main/cpp/include/libkn_api.h
View file @
6ab0afea
...
...
@@ -1138,6 +1138,7 @@ typedef struct {
void
(
*
pirntRandomHiLog
)();
void
(
*
pirntSingleHiLog
)();
void
(
*
testArkTsToKotin_
)();
void
(
*
triggerANRByInfiniteLoop
)();
}
demo013
;
}
dong
;
}
com
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment