Re: Strange segfault with improper usage

"Ger Hobbelt" <[email protected]>
Newsgroups gmane.mail.spam.crm114
Message-ID <[email protected]>
On Mon, Mar 24, 2008 at 1:22 PM, Bill Y <[email protected]> wrote:

>
>
>   From: Paolo <[email protected]>
>
>
>   On Fri, Mar 21, 2008 at 04:23:54PM +0100, Paolo wrote:
>   > On Fri, Mar 21, 2008 at 10:52:17AM -0400, Bill Y wrote:
>   > >
>   > > I'm just suggesting -e to see if that tickles (or de-tickles) the bug.
>
>   in crm_osb_bayes.c:1240 we get SEGV if -t is used and one cssfile is missing:
>
>     if (internal_trace)
>       fprintf (stderr, " files  %ld  learns #0 %lu  #1 %lu  total %lu cp0 %f cp1 %
>   f \n",
>              maxhash,
>              hashes[0][learns_index[0]].value,
>              hashes[1][learns_index[1]].value,
>              total_learns,
>              cpcorr [0],
>              cpcorr [1] );
>
>   got it on Milan's vserver.
>
>   This is not the bug we're chasing here. A bug
>   nevertheless. Possibly in other classifiers as well.
>
> OK, got a patch?
>
> (speakin' of which, TRE 0.7.5 is _less_ buggy than 0.7.3 and therefore
> should be considered the "stable" branch (at least as far as I know).)

Try this snippet on for size:

----

    if (internal_trace)
    {
        fprintf(stderr, " files  %ld  learns #0 %lu  #1 %lu  total %lu
cp0 %f cp1 %f\n",
                 maxhash,
                (maxhash > 0 ? hashes[0][learns_index[0]]
.value : 0),
                (maxhash > 1 ? hashes[1][learns_index[1]].value : 0),

                total_learns,
                cpcorr[0],
                 cpcorr[1]);
    }
----
Theoretically, the trace() there should be augmented to cope with a
variable number of CSS files, but this will do for now, I think ;-)



Ad TRE 0.x.x:

 on my boxes (64-bit UNIX, 32-bit Win32) 0.7.4 will crash under
'spurious circumstances' when used with crm114. -This from my notes
from last year; no test case to exhibit failure, unfortunately-
this was at least in part (if not all) due to NULL pointers being
shoved into TRE through the API.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.