Hi,

I have noticed some problem in the cppdb branch (at least) in combination with 
the inband code.

when the usrp instances are destructed, the vector holding the daughterboard 
instances is destructed as well, but there seems to be some problem doing the 
destruction in the right order. Symptoms are: a) deadlock in the inband 
examples, b) gdb stopping in siglongjmp, c) valgrind reporting accesses to 
already freed memory.

The attached small patch fixes this problem.

Stefan

-- 
Stefan Brüns  /  Bergstraße 21  /  52062 Aachen
mailto:lurch at gmx.li  http://www.kawo1.rwth-aachen.de/~lurchi/
   phone: +49 241 53809034     mobile: +49 151 50412019
=== modified file 'usrp/host/lib/legacy/usrp_basic.cc'
--- usrp/host/lib/legacy/usrp_basic.cc	2008-09-24 17:59:43 +0000
+++ usrp/host/lib/legacy/usrp_basic.cc	2008-10-08 14:15:58 +0000
@@ -815,6 +815,8 @@
   if (!usrp_9862_write_many_all (d_udh, rx_fini_regs, sizeof (rx_fini_regs))){
     fprintf (stderr, "usrp_basic_rx: failed to fini AD9862 RX regs\n");
   }
+  d_db[SLOT_RX_A].resize(0);
+  d_db[SLOT_RX_B].resize(0);
 }
 
 int
@@ -1208,6 +1210,8 @@
   if (!usrp_9862_write_many_all (d_udh, tx_fini_regs, sizeof (tx_fini_regs))){
     fprintf (stderr, "usrp_basic_tx: failed to fini AD9862 TX regs\n");
   }
+  d_db[SLOT_TX_A].resize(0);
+  d_db[SLOT_TX_B].resize(0);
 }
 
 int

_______________________________________________
Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to