Skip to content

Commit 51ab7b0

Browse files
committed
YJIT: gen_struct_aset check for frozen status
1 parent 7379b9e commit 51ab7b0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

yjit/src/codegen.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8947,6 +8947,12 @@ fn gen_struct_aset(
89478947
return None;
89488948
}
89498949

8950+
// If the comptime receiver is frozen, writing a struct member will raise an exception
8951+
// and we don't want to JIT code to deal with that situation.
8952+
if comptime_recv.is_frozen() {
8953+
return None;
8954+
}
8955+
89508956
if c_method_tracing_currently_enabled(jit) {
89518957
// Struct accesses need fire c_call and c_return events, which we can't support
89528958
// See :attr-tracing:

0 commit comments

Comments
 (0)