Skip to content

Commit ba0e81d

Browse files
[ir] Sanitize SPIRV debugprintf string (#8752)
Issue: # ### Brief Summary copilot:summary ### Walkthrough copilot:walkthrough --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 7c7a3ef commit ba0e81d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

taichi/codegen/spirv/spirv_codegen.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,8 @@ class TaskCodegen : public IRVisitor {
971971
ir_->make_inst(spv::OpBranchConditional, cond, then_label, merge_label);
972972
// then block
973973
ir_->start_label(then_label);
974-
ir_->call_debugprintf(op + " overflow detected in " + tb, {});
974+
ir_->call_debugprintf(
975+
op + " overflow detected in " + sanitize_format_string(tb), {});
975976
ir_->make_inst(spv::OpBranch, merge_label);
976977
// merge label
977978
ir_->start_label(merge_label);

0 commit comments

Comments
 (0)