Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Segfault in model 15009 Winradio WR-G313

Aperta
#1,905 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
58/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
c
Ambito
backend

Direzione di ricerca

Start in g313-posix.c at g313_get_powerstat() around line 357, then read g313_init_api() and the handling of a missing wrg313api.so. Reproduce with rigctl --model 15009 when the shared library is unavailable. Done means the command exits safely instead of calling a null GetPower pointer; check for related calls through the other external symbols as well.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Backend Bug

Describe the bug
rigctl --model 15009 crashes if wrg313api.so isn't found.

To Reproduce
rigctl --model 15009 (no need to issue a command)

Debug Output

$ rigctl --model 15009 -vvvv
tests/rigctl --model 15009 -vvvv
rigctl.c(471) Startup: /home/ham/Hamlib/tests/.libs/rigctl --model 15009 -vvvv
rigctl Hamlib 4.7~git 2025-09-09T18:36:58Z SHA=a9afa8 64-bit
Report bugs to <[email protected]>

rig_init: 2038 time test passed
initrigs4_winradio: _init called
rig_init: rig_model=Winradio WR-G313 20191224.0
rig_init: rig does not have tx_range!!
rig_init: rig has VFO_A
g313_init_api: Unable to load G313 shared library wrg313api.so
rig.c(1051):rig_open entered
rig_open: 0x55e019f1cc34 rs->comm_state==1?=1
*1:rig.c(6965):rig_get_powerstat entered
Segmentation fault (core dumped)

Backtrace

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00007f008b34561f in g313_get_powerstat (rig=0x558269036810, status=0x7fff99df4b8c) at g313-posix.c:357
#2  0x00007f008af2a54f in rig_get_powerstat () from /home/daniele/Programmazione/ham/Hamlib/src/.libs/libhamlib.so.4
#3  0x00007f008aee7ada in rig_open () from /home/daniele/Programmazione/ham/Hamlib/src/.libs/libhamlib.so.4
#4  0x000055825cac4ea7 in main (argc=4, argv=0x7fff99df6048) at rigctl.c:626
gdb) up
#1  0x00007f008b34561f in g313_get_powerstat (rig=0x558269036810, status=0x7fff99df4b8c) at g313-posix.c:357
357         int ret = GetPower(priv->hRadio, &p);
(gdb) p GetPower
$2 = (GET_POWER) 0x0

Additional context
The symbol GetPower would be initialized with dlopen("wrg313api.so", ...) in g313_init_api() but that library isn't found on my system, so GetPower and other external symbols are NULL.

Lingua principale
C
Stelle
851
Fork
308
Merge medio
5g 5h
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Hamlib/Hamlib

Tutte le issue di Hamlib/Hamlib

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.