aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M
diff options
context:
space:
mode:
authorkurtis.heimerl <kurtis.heimerl@19bc5d8c-e614-43d4-8b26-e1612bc8e597>2011-11-26 03:19:33 +0000
committerkurtis.heimerl <kurtis.heimerl@19bc5d8c-e614-43d4-8b26-e1612bc8e597>2011-11-26 03:19:33 +0000
commitb99cbf384b7a45b53e72ac2f3fef6fac5c7a75ec (patch)
tree3777cdc1977e6a65ce3196ab534c3f746dfd3591 /Transceiver52M
parent66ad2db373179b56fc5729f432d10040653ebda5 (diff)
transceiver, resamp: enlarge transmit resampler output buffer
It was possible to reach a state where a resampled burst would overrun the transmit output buffer and corrupt the global allocated signal vectors. The result was a segmentation fault when attempting to access heap allocated signal vectors since the pointers were garbage. Whether the segfault occured or not appears to depend on the memory location of the signal vector pointers, since it does not occur on all systems. Double buffer size to accomodate an incoming burst plus up to a full chunk that may be remaining from the previous resampling operation. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2691 19bc5d8c-e614-43d4-8b26-e1612bc8e597
Diffstat (limited to 'Transceiver52M')
-rw-r--r--Transceiver52M/radioIOResamp.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/Transceiver52M/radioIOResamp.cpp b/Transceiver52M/radioIOResamp.cpp
index 3918068..8e8ac75 100644
--- a/Transceiver52M/radioIOResamp.cpp
+++ b/Transceiver52M/radioIOResamp.cpp
@@ -51,8 +51,16 @@ signalVector *rx_hist = 0;
signalVector *tx_vec = 0;
signalVector *rx_vec = 0;
-/* High rate (device facing) buffers */
-short tx_buf[INCHUNK * 2 * 2];
+/*
+ * High rate (device facing) buffers
+ *
+ * Transmit side samples are pushed after each burst so accomodate
+ * a resampled burst plus up to a chunk left over from the previous
+ * resampling operation.
+ *
+ * Receive side samples always pulled with a fixed size.
+ */
+short tx_buf[INCHUNK * 2 * 4];
short rx_buf[OUTCHUNK * 2 * 2];
/*