[asterisk-bugs] [Asterisk 0012886]: crash asterisk.c compiled for i486sx with out fpu

noreply at bugs.digium.com noreply at bugs.digium.com
Thu Jun 19 11:00:36 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12886 
====================================================================== 
Reported By:                tecnoxarxa
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   12886
Category:                   General
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.21-rc1 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             06-18-2008 19:03 CDT
Last Modified:              06-19-2008 11:00 CDT
====================================================================== 
Summary:                    crash asterisk.c compiled for i486sx with out fpu
Description: 
Crash:

http://bugs.digium.com/view.php?id=0  0x08069847 in rdtsc () at asterisk.c:433
No locals.
http://bugs.digium.com/view.php?id=1  0x08069659 in ast_mark (i=0, startstop=1)
at asterisk.c:442
No locals.
http://bugs.digium.com/view.php?id=2  0x080b8a04 in extension_match_core
(pattern=0x817f4d8 "200",
data=0xb7c71bc4 "69", mode=E_MATCH) at pbx.c:878
        i = 135787688
        prof_id = 0



File: asterisk.c

---- Start Line 416 --------

#if defined ( __i386__) && (defined(__FreeBSD__) || defined(linux))
#if defined(__FreeBSD__)
#include <machine/cpufunc.h>
#elif defined(linux)
static __inline uint64_t
rdtsc(void)
{
        uint64_t rv;

        __asm __volatile(".byte 0x0f, 0x31" : "=A" (rv));
        return (rv);
}
#endif
#else   /* supply a dummy function on other platforms */
static __inline uint64_t
rdtsc(void)
{
        return 0;
}
#endif

int64_t ast_mark(int i, int startstop)
{
        if (!prof_data || i < 0 || i > prof_data->entries) /* invalid
index */
                return 0;
        if (startstop == 1)
                prof_data->e[i].mark = rdtsc();
        else {
                prof_data->e[i].mark = (rdtsc() - prof_data->e[i].mark);
                if (prof_data->e[i].scale > 1)
                        prof_data->e[i].mark /= prof_data->e[i].scale;
                prof_data->e[i].value += prof_data->e[i].mark;
                prof_data->e[i].events++;
        }
        return prof_data->e[i].mark;
}

---- end ----
====================================================================== 

---------------------------------------------------------------------- 
 svnbot - 06-19-08 11:00  
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 123869

U   branches/1.4/main/asterisk.c

------------------------------------------------------------------------
r123869 | tilghman | 2008-06-19 11:00:27 -0500 (Thu, 19 Jun 2008) | 6
lines

The RDTSC instruction was introduced on the Pentium line of
microprocessors,
and is not compatible with certain 586 clones, like Cyrix.  Hence, asking
for
i386 compatibility was always incorrect. See
http://en.wikipedia.org/wiki/RDTSC
(Closes issue http://bugs.digium.com/view.php?id=12886)
Reported by tecnoxarxa

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=123869 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
06-19-08 11:00  svnbot         Note Added: 0088929                          
======================================================================




More information about the asterisk-bugs mailing list