Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AIX] r2r silently fails when jq not available #22485

Open
riptl opened this issue Dec 7, 2023 · 1 comment
Open

[AIX] r2r silently fails when jq not available #22485

riptl opened this issue Dec 7, 2023 · 1 comment

Comments

@riptl
Copy link
Contributor

riptl commented Dec 7, 2023

Environment

r2 -v
uname -ms
Thu Dec  7 00:22:09 CST 2023
radare2 5.8.9 31694 @ unknown-ppc-32
birth: git.5.8.8-947-g54c9871c9c 2023-12-06__08:55:00
commit: 54c9871c9c081fe2367197dc16d991c35a0520cb
options: gpl -O? cs:5 cl:2 meson
AIX 00C63ED04B0

Description

When jq command doesn't exist, on AIX weirdly launching the subprocess still works, but then fails at the first write.

(SIGPIPE does not get caught so r2r exits with code 141)

Starting program: /home/guest/radare2/build/binr/r2r/r2r test/db/asm/or1k
INFO: Running from /home/guest/radare2/test
[Detaching after fork from child process 25428090]
Already up to date.
Loaded 160 tests.
[New Thread 258]
[Detaching after fork from child process 25428092]
[Switching to Thread 1]

Thread 1 hit Catchpoint 1 (signal SIGPIPE), 0x0900000000038be0 in write () from /lib/libc.a(shr_64.o)
(gdb) bt
#0  0x0900000000038be0 in write () from /lib/libc.a(shr_64.o)
#1  0x0000000100063048 in r2r_subprocess_stdin_write ()
#2  0x0000000100063eb4 in r2r_check_jq_available ()
#3  0x0000000100002aa8 in main ()
@trufae
Copy link
Collaborator

trufae commented Dec 13, 2023

bool jq_available = r2r_check_jq_available ();

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

No branches or pull requests

2 participants