Skip to content

Adapt to rizin API changes and update color parsing to ecj - #83

Merged
wargio merged 3 commits into
rizinorg:devfrom
PremadeS:update-interrupt
Oct 20, 2026
Merged

wargio merged 3 commits into
rizinorg:devfrom
PremadeS:update-interrupt

Conversation

@PremadeS

@PremadeS PremadeS commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor
  • Use correct methods after Remove global RzCons instance rizin#6826
  • Use stack-based RzIterator
  • Use ecj instead of ec* for parsing colors inside js/llibdecprinter.js:12 - initializeColors(). Used LLM for this so might be worth verifying that the logic is correct

However after these changes its crashing on alot more functions than it used to. Not sure if something changed internally in rizin that is causing this

Test (/bin/ls macos arm64)
1- Install jsdec
2- rizin -q -c "aa; s entry0; pddA" /bin/ls

jsdec has crashed (info: /bin/ls @ 0x100000960).
Please report the bug at https://github.com/rizinorg/jsdec/issues
Use the option '--issue' or the command 'pddi' to generate 
the needed data for the issue.

On Cutter it says: "Failed to parse JSON from jsdec"
Works fine against Cutter 2.5.0 release binary for macos arm64

Some functions do produce correct output though
rizin -q -c "aa; s 0x100000700; pddA" /bin/ls

{"code":"/* jsdec pseudo code output */\n/* /bin/ls @ 0x100000700 */\n#include <stdint.h>\n \nvoid func_100000700 (int64_t arg1, int64_t arg2) {\n    x0 = arg1;\n    x1 = arg2;\n    /* [00] -r-x section size 15268 named 0.__TEXT.__text */\n    x0 += 0x68;\n    x1 += 0x68;\n    return void (*0x100004684)() ();\n}\n","annotations":[{"start":0,"end":30,"type":"offset","offset":"4294969088"},{"start":0,"end":30,"type":"syntax_highlight","syntax_highlight":"comment"},{"start":31,"end":58,"type":"offset","offset":"4294969088"},{"start":31,"end":58,"type":"syntax_highlight","syntax_highlight":"comment"},{"start":59,"end":78,"type":"offset","offset":"4294969088"},{"start":59,"end":78,"type":"syntax_highlight","syntax_highlight":"comment"},{"start":79,"end":80,"type":"offset","offset":"4294969088"},{"start":81,"end":131,"type":"offset","offset":"4294969088"},{"start":81,"end":85,"type":"syntax_highlight","syntax_highlight":"datatype"},{"start":86,"end":100,"type":"syntax_highlight","syntax_highlight":"function_name"},{"start":86,"end":100,"type":"function_name","name":"sym.func.100000700","offset":"4294969088"},{"start":102,"end":109,"type":"syntax_highlight","syntax_highlight":"datatype"},{"start":110,"end":114,"type":"local_variable","name":"arg1"},{"start":110,"end":114,"type":"syntax_highlight","syntax_highlight":"local_variable"},{"start":116,"end":123,"type":"syntax_highlight","syntax_highlight":"datatype"},{"start":124,"end":128,"type":"local_variable","name":"arg2"},{"start":124,"end":128,"type":"syntax_highlight","syntax_highlight":"local_variable"},{"start":132,"end":146,"type":"offset","offset":"4294969088"},{"start":141,"end":145,"type":"syntax_highlight","syntax_highlight":"local_variable"},{"start":141,"end":145,"type":"local_variable","name":"arg1"},{"start":147,"end":161,"type":"offset","offset":"4294969088"},{"start":156,"end":160,"type":"syntax_highlight","syntax_highlight":"local_variable"},{"start":156,"end":160,"type":"local_variable","name":"arg2"},{"start":162,"end":222,"type":"offset","offset":"4294969088"},{"start":162,"end":222,"type":"syntax_highlight","syntax_highlight":"comment"},{"start":223,"end":238,"type":"offset","offset":"4294969088"},{"start":233,"end":237,"type":"syntax_highlight","syntax_highlight":"constant_variable"},{"start":233,"end":237,"type":"constant_variable","offset":"104"},{"start":239,"end":254,"type":"offset","offset":"4294969092"},{"start":249,"end":253,"type":"syntax_highlight","syntax_highlight":"constant_variable"},{"start":249,"end":253,"type":"constant_variable","offset":"104"},{"start":255,"end":291,"type":"offset","offset":"4294969096"},{"start":259,"end":265,"type":"syntax_highlight","syntax_highlight":"keyword"},{"start":266,"end":270,"type":"syntax_highlight","syntax_highlight":"datatype"},{"start":273,"end":284,"type":"syntax_highlight","syntax_highlight":"constant_variable"},{"start":273,"end":284,"type":"constant_variable","offset":"4294985348"},{"start":292,"end":293,"type":"offset","offset":"4294969096"}]}

Above command produces output only on pddA, no output on pdd and pddj for some reason

pddi output:
jsdec-issue.txt

@wargio
wargio merged commit 4f17096 into rizinorg:dev Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants