39 Star 57 Fork 402

OpenHarmony / arkcompiler_runtime_core

 / 详情

[Bug]: Wrong output of string concatenation tests

待办的
创建于  
2024-05-07 20:49

发生了什么问题?

Upcoming changes of a frontend related to a nullable arrays initialization fails to work with 'StringBuffer reserve internal buffer' optimization

期望行为是什么?

'StringBuffer reserve internal buffer' optimization should not change string concatenation results

如何复现该缺陷

The original test which fails is static_core/plugins/ets/tests/ets_test_suite/coroutines/launch_n_workers.ets, but the code to produce the error can be reduced to this snippet:

function main(): void {
    for (let i = 0; i < 100; ++i) {
        console.log("J"+ i +"k")
    }
}

Compile the code with the patch applied.
The bytecode after manual verification, and checking with the verifier, seems right.
To get error, the runtime needs the following extra parameterization:
./build/bin/ark --boot-panda-files=./build/plugins/ets/etsstdlib.abc --compiler-enable-jit=true --no-async-jit=true --compiler-hotness-threshold=0 --load-runtimes=ets test_ets.abc ETSGLOBAL::main
The output is as follows:

"J0k"
"1k"
"2k"
"3k"
"4k"
"5k"
"6k"
"7k"
"8k"
"9k"
"10k"
"11k"
"12k"
"13k"
"14k"
"15k"
"16k"
"17k"
"18k"
"19k"
"20k"
"21k"
"22k"
"23k"
"24k"
"25k"
[TID 00d1e3] F/gc:  Broken object doesn't have class: 0x4411c0 accessed from root: STRING_TABLE
FATAL ERROR

其他补充信息

版本或分支信息

  • master
  • Release 4.1
  • Release 4.0
  • Release 3.2

评论 (1)

Mikhail Ivanov 创建了任务
Mikhail Ivanov 添加了
 
bug
标签
展开全部操作日志

感谢提交Issue!关于Issue的交互操作,请访问OpenHarmony社区支持命令清单。如果有问题,请联系 @godmiaozi @peijiajun @Ishin Pavel @Vyacheslav Cherkashin 。如果需要调整订阅PR、Issue的变更状态,请访问链接

Thanks for submitting the issue. For more commands, please visit OpenHarmony Command List. If you have any questions, please refer to committer @godmiaozi @peijiajun @Ishin Pavel @Vyacheslav Cherkashin for help. If you need to change the subscription of a Pull Request or Issue, please visit the link.

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
7387629 openharmony ci 1656582662
1
https://gitee.com/openharmony/arkcompiler_runtime_core.git
git@gitee.com:openharmony/arkcompiler_runtime_core.git
openharmony
arkcompiler_runtime_core
arkcompiler_runtime_core

搜索帮助