(https://github.com/ruby/irb/pull/442)
* Add test_in_isolation task to run tests in isolation
This simulates how tests are run in Ruby CI and can detect some issues
before they're merged and break Ruby CI later.
* Run test_in_isolation task on CI
* Fix TestRaiseNoBacktraceException's setup
https://github.com/ruby/irb/commit/51f23c58b0
In rb_shape_rebuild_shape, we need to increase the capacity when
capacity == next_iv_index since the next ivar will be writing at index
next_iv_index.
This bug can be reproduced when assertions are turned on and you run the
following code:
class Foo
def initialize
@a1 = 1
@a2 = 1
@a3 = 1
@a4 = 1
@a5 = 1
@a6 = 1
@a7 = 1
end
def add_ivars
@a8 = 1
@a9 = 1
end
end
class Bar < Foo
end
foo = Foo.new
foo.add_ivars
bar = Bar.new
GC.start
bar.add_ivars
bar.clone
You will get the following crash:
Assertion Failed: object.c:301:rb_obj_copy_ivar:src_num_ivs <= shape_to_set_on_dest->capacity
Based on this commit: 93f87ec653
It appears that the maintainer @aycabta wanted to deprecate any `USE_*LINE` configs in favor of
`USE_MULTILINE`. So we should deprecate `USE_RELINE` as well.
https://github.com/ruby/irb/commit/478f19f3ae
access properly. Because the libclang node had two children, it wasn't
handled well by the pattern matching for the bit field case.
In addition to that, this bit field has a non-1 width. Because we're
returning true/false for a width-1 bit field, I added another behavior
that works like a char value for bit fields with width 2-8.
NotImplementedError is not part StandardError, for example. When that
kind of exception happens, current_cc_unit remains not NULL, and
mjit_finish ends up waiting for 5 seconds, which is inconvenient.
When RUBY_DEBUG is enabled, shape ids are 16 bits. I would like to do
16 bit comparisons, so I need to load halfwords sometimes. This commit
adds LDURH so that I can load halfwords.
https://developer.arm.com/documentation/ddi0596/2021-12/Base-Instructions/LDURH--Load-Register-Halfword--unscaled--?lang=en
I verified the bytes using clang:
```
$ cat asmthing.s
.global _start
.align 2
_start:
ldurh w10, [x1]
ldurh w10, [x1, #123]
$ as asmthing.s -o asmthing.o && objdump --disassemble asmthing.o
asmthing.o: file format mach-o arm64
Disassembly of section __TEXT,__text:
0000000000000000 <ltmp0>:
0: 2a 00 40 78 ldurh w10, [x1]
4: 2a b0 47 78 ldurh w10, [x1, #123]
```
It seems like dependabot supports updating the `# vX.Y.Z` comment.
The reason why I disabled this was that it failed to update this, but
maybe it was because it had `, checking sha`. Let me try it again with
that removed.
During auto-compaction, using length to determine whether or not a
string can be re-embedded may be a problem for newly created strings.
This is because usually it requires a malloc before setting the length.
If the malloc triggers compaction, then the string may be re-embedded
and can cause crashes.
If auto-compaction is enabled, then we have to set the capacity/shared
immediately after allocating a heap array. If compaction runs before
capacity/shared is set then it could cause the array to be re-embedded,
which can cause crashes.
The structure and readability of jit_exec is messed up right now. I'd
like to help the current situation by this for now. I'll resurrect
them when I need it again.
Follow-up for 2b8191bdad. Since that
commit, we stopped doing code invalidation the second time the call and
return events are enabled. We need to do it every time these events are
enabled because we might have generated code while these events are
disabled.
Also rename locals and edit comments to make it more clear that the iseq
rewrite code path only happens the first time a particular iseq trace
event is enabled.