Custom Query (541 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (25 - 27 of 541)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Ticket Resolution Summary Owner Reporter
#415 fixed Decimate crash et stefan
Description

May be related to ticket #68

Adriana Liendo wrote:

Using DecimationRates "2", it gives the next message:

seismo@pemon:/opt/earthworm/pemon/params$ decimate decimate_100_50.d
remez: failed to converge; error criteria not assured

I used different combination just to see if it gives different messages and when I used DecimationRates "2 1" (expecting an error) the startstop says the decimate was alive, but with no data. If I run it in the command-line, I got this message: "*** Error in `decimate': malloc(): memory corruption: 0x09c820d0 ***", and it keeps frozen.

attached is .d file

#417 fixed access to uninitialized variable and memory access violation when DecimationRates "1" in src/seismic_processing/decimate et baker
Description

When DecimationRates? in decimate.d contains "1" , decimate can fail:

*** glibc detected *** decimate: free(): invalid next size (fast): 0x08e9e798 ***

The workaround is to request a decimation value > 1.

decimate uses the Remez Exchange Algorithm for computing FIR filter coefficients. The algorithm requires the filter length to be >= 3. The original Fortran code read the filter length as input, and STOP'ed if it was < 3. The code in decimate computes the filter length from the decimation rate, but does not validate the computed value. When the decimation rate is 1, the filter length is 0. This violates the prerequisites for the algorithm, and results in both a read of an uninitialized variable and an out-of-bounds write to an array. The latter clobbers memory and leads to the error reported when free() is executed.

The fix is to validate the filter length required for the decimation and reject an invalid value.

Here's the fix. I also moved the printout of the decimation stage number so that it will appear in the log file immediately before the message that the filter length is invalid.

--- src/seismic_processing/decimate/setdecstg.c
+++ src/seismic_processing/decimate/setdecstg.c 
@@ -169,2 +169,5 @@
   {
+    logit("","\nStage %d: decimation rate: %d\n", stage + 1,
+          pDcm->filter[stage].decRate );
+
     /* Stop-band frequency is stage samplerate - final Nyquist;
@@ -198,5 +201,2 @@
     /* Log some information about this stage */
-    logit("","\nStage %d: decimation rate: %d\n", stage + 1,
-          pDcm->filter[stage].decRate );
-
     if (stage == 0)
--- src/seismic_processing/decimate/remeznp.c
+++ src/seismic_processing/decimate/remeznp.c   
@@ -100,3 +100,8 @@
 #endif
-
+
+  if (nFilt < 3) {
+    logit("e", "remeznp: invalid filter length (=%d); must be >= 3\n", nFilt );
+    return EW_FAILURE;
+  }
+
   if (nFilt % 2 != nodd) nFilt ++;
#426 fixed ewexport2ringserver needs a windows compile solution et paulf
Description

There is no makefile.nt for the ewexport2ringserver module.

Note ringserver itself won't compile on Windows, but the exporter module should be able to.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Note: See TracQuery for help on using queries.