Re: [Hamlib-developer] ATS Mini backend (44001) segfault in p_ats_update_state() with firmware 2.35
Library to control radio transceivers and receivers
Brought to you by:
n0nb
|
From: Jon S. <jon...@gm...> - 2026-08-25 01:13:20
|
Hello first user of ATS driver :) I'll try to look into this and reproduce it on my setup, the verbose output would be appreciated. Also please do not expect quick fixes, this is a weekend project for me :( Best regards On Sun, Aug 23, 2026 at 07:21:33PM +0200, Olav Roth via Hamlib-developer wrote: > Hello, > > I found a reproducible segmentation fault in the new ATS Mini > Hamlib backend (model 44001) on macOS. > > Environment: > - macOS, 64-bit > - ATS Mini firmware 2.35 > - Hamlib 5.0.0~git 2026-08-23 > - commit 45755bebf > - /dev/cu.usbmodem14201 > - 115200 baud > > The ATS Mini returns monitor responses such as: > > 235,14074,0,0,ALL,USB,1k,3.0k,0,40,27,0,1,4.86,47 > > Frequency and mode control otherwise work. > > When using rigctld, it can eventually crash with EXC_BAD_ACCESS. > An LLDB backtrace shows: > > strtod > p_ats_update_state() at ats.c:97:38 > ats_mini_get_freq() at ats.c:383:15 > rig_get_freq() > rig_set_freq() > rigctl_set_freq() > rigctl_parse() > handle_socket() > > The immediate fault is in strtod(), apparently while parsing a > monitor response. It looks like p_ats_update_state() can pass a > NULL/invalid token to the numeric parser if the response is > incomplete or otherwise unexpected. > > I have the complete -vvvvv rigctld output and LLDB backtrace > available if useful. > > This is the best part: > > * thread #3, stop reason = EXC_BAD_ACCESS (code=1, address=0x0) > * frame #0: ... libsystem_c.dylib`fastParse64 > frame #1: ... `_ffpp_strtoencf64_l` > frame #2: ... `strtod` > frame #3: ... libhamlib.5.dylib`p_ats_update_state(rig=...) at ats.c:97:38 > frame #4: ... `ats_mini_get_freq(...)` at ats.c:383:15 > frame #5: ... `rig_get_freq(...)` at rig.c:2687:19 > frame #6: ... `rig_set_freq(...)` at rig.c:2452:23 > frame #7: ... `rigctld` ... `rigctl_set_freq(...)` > frame #8: ... `rigctld` ... `rigctl_parse(...)` > frame #9: ... `rigctld` ... `handle_socket(...)` > > vy 73, > Olav > DG3BP > > _______________________________________________ > Hamlib-developer mailing list > Ham...@li... > https://lists.sourceforge.net/lists/listinfo/hamlib-developer |