Files
iperf3-gui/android/app
irene a31cdef775 fix: resolve argv[0] misparse and SIGSEGV hang in JNI bridge
Two root causes prevented iperf3 tests from running:

1. argv[0] bug: iperf_parse_arguments() expects argv[0] to be the
   program name. We passed Dart args directly, so argv[0] was '-c',
   which iperf3 misinterpreted as the program name → 'Argument parse
   error: must either be a client (-c) or server (-s)'. Fixed by
   prepending "iperf3" as argv[0] and shifting user args to argv[1+].

2. Signal handling: iperf_catch_sigend() installs handlers that use
   longjmp() to a jmp_buf, but we never initialized the buffer with
   setjmp(). Any signal during iperf_run_client() caused SIGSEGV or
   hang. Added setjmp/longjmp wrapper matching main.c's pattern,
   SIGPIPE=SIG_IGN, and a 30s connect_timeout to avoid DNS hangs.

Also extracted iperf_cleanup_and_signal() to deduplicate the
normal-return and longjmp paths. Added diagnostic logging to
IperfRunner.kt's library loading for faster future debugging.
2026-08-26 01:52:37 +09:00
..