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
感谢提交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.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
登录 后才可以发表评论