General

Profile

runlevel5 (Trung Le)

  • Login: runlevel5
  • Registered on: 04/14/2020
  • Last sign in: 11/26/2026

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 4 2 6

Activity

Today

01:40 AM Ruby Bug #22649 (Open): ZJIT: compile time is quadratic in method size, in handle_caller_saved_regs

## Summary
While fuzzing ZJIT with generated programs I noticed that long methods take a surprisingly long time to compile. I tracked it down to `Assembler::handle_caller_saved_regs`: for each `CCall` it looks at every interval of t...
runlevel5 (Trung Le)
01:37 AM Ruby Bug #22639: ZJIT: three byte order assumptions in code shared by all backends
alanwu (Alan Wu) wrote in #note-1:
> Right, ZJIT doesn't support PowerPC and doesn't plan to for now.
Thanks for the quick reply, Alan, and that's completely fair. I'm not asking for PowerPC support, and I don't expect the team to ta...
runlevel5 (Trung Le)

11/26/2026

11:42 PM Ruby Bug #22648 (Open): ZJIT: [BUG] panic in codegen on FixnumRShift in a branch arm that clean_cfg made unreachable

## Summary
ZJIT panics while compiling a method whose `||` condition folds to a constant, when the arm that is no longer taken contains a `>>` by a constant:
```
dead1.rb:3: [BUG] ZJIT: panicked at zjit/src/codegen.rs:774:71:
c...
runlevel5 (Trung Le)
02:33 PM Ruby Bug #22641: ZJIT: "Function failed validation" on FixnumRShift in a block that type inference found unreachable

## Cause
The function is valid after every pass until `canonicalize` in the second iteration of the optimisation loop:
1. Iteration 1, `fold_constants`: both `a4 / 2` sites, in `bb6` and in `bb5`, are rewritten to `FixnumRShift`. Both...
runlevel5 (Trung Le)
11:28 AM Ruby Bug #22641 (Open): ZJIT: "Function failed validation" on FixnumRShift in a block that type inference found unreachable

## Summary
In a build with debug assertions (`--enable-zjit=dev`), ZJIT aborts while compiling a method that compares an argument with `!=` and then divides it by a power of two, once the division has been profiled with both a Fixnu...
runlevel5 (Trung Le)
02:54 AM Ruby Bug #22640 (Open): Thread stack size is one guard page too small on glibc 2.27+, and running into the guard is a segmentation fault

## Summary
On Linux with glibc 2.27 or later, `get_stack()` in `thread_pthread.c` takes the guard size off the size of a thread's stack, although glibc no longer counts the guard in that size. For every thread but the main one this ...
runlevel5 (Trung Le)
12:39 AM Ruby Bug #22639 (Rejected): ZJIT: three byte order assumptions in code shared by all backends
Three places in code that every ZJIT backend shares assume a little-endian host:
1. `gen_string_copy` (`zjit/src/codegen.rs`) reverses every 8 bytes of a short string it copies inline.
2. `rb_shape_id_offset()` (`shape.c`) returns th...
runlevel5 (Trung Le)

04/14/2020

02:32 AM Ruby Bug #16784 (Closed): Compiling with --enable-load-relative and "musl-gcc -static" yields "negative string size (or size too big) (ArgumentError)"
```
$ uname -ar
Linux localhost 5.4.27-0-lts #1-Alpine SMP Mon, 23 Mar 2020 18:15:20 UTC ppc64le Linux
$ gcc --version
gcc (Alpine 9.2.0) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the sour...
runlevel5 (Trung Le)

Also available in: Atom