[Subject Prev][Subject Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hts-users:02536] A bug in HAdapt.c


Hi,

I found a bug in HAdapt.c:UpdateMInfo(). It should create SVector rather than Vector. Otherwise, it rarely causes a segmentation fault in HAdapt.c:ConvFullCov(). Please apply the attached patch code to your HTS-2.1.1 source code.

Regards,

Heiga ZEN (Byung Ha CHUN)

======================================================================
NOTE: The information in this email and any attachments may be
confidential and/or legally privileged. This message may be read, copied
and used only by the intended recipient. If you are not the intended
recipient, please destroy this message, delete any copies held on your
system and notify the sender immediately.

Toshiba Research Europe Limited, registered in England and Wales (2519556).
Registered Office: 208 Cambridge Science Park, Milton Road, Cambridge
CB4 0GZ, England. Web: http://www.toshiba-europe.com/research/crl
======================================================================



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
--- HAdapt.c	2010-07-06 09:01:12.054722000 +0000
+++ HAdapt.c	2010-07-06 09:02:04.031735000 +0000
@@ -130,7 +130,7 @@
 } AInfo;
 
 typedef struct {
-   Vector mean;
+   SVector mean;
    CovKind ckind;
    Covariance cov;
    float gConst;
@@ -1250,7 +1250,7 @@
                   mi = GetMInfo(mp);
                   if ((adaptMean) && (mi->mean == NULL)) {
 		     size = VectorSize(mp->mean);
-                     mi->mean = CreateVector(hset->hmem,size);
+                     mi->mean = CreateSVector(hset->hmem,size);
                      CopyVector(mp->mean,mi->mean);
                      nMInfo++;
                   } 
@@ -1260,7 +1260,7 @@
                      case INVDIAGC:
                         if (mi->cov.var == NULL) {
 			   size = VectorSize(mp->mean);
-                           mi->cov.var = CreateVector(hset->hmem,size);
+                           mi->cov.var = CreateSVector(hset->hmem,size);
                            CopyVector(mp->cov.var,mi->cov.var);
                            mi->gConst = mp->gConst;
                            mi->ckind  = mp->ckind; 

Follow-Ups
[hts-users:02545] Re: A bug in HAdapt.c, Keiichiro Oura