[pcre-dev] [Bug 1716] New: pcre_exec return 0 in mips64-octe…

Página Principal
Apagar esta mensagem
Autor: admin
Data:  
Para: pcre-dev
Assunto: [pcre-dev] [Bug 1716] New: pcre_exec return 0 in mips64-octeon-linux-gnu
https://bugs.exim.org/show_bug.cgi?id=1716

            Bug ID: 1716
           Summary: pcre_exec return 0 in mips64-octeon-linux-gnu
           Product: PCRE
           Version: 8.37
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
          Assignee: ph10@???
          Reporter: berlinsaint@???
                CC: pcre-dev@???


Hello,my platform is mips64-octeon-linux-gnu;
i add  register_function in pcre_global.c like this
:
PCRE_EXP_DATA_DEFN void register_pcre_malloc_fun( PCRE_MALLOC_T malloc,
PCRE_FREE_T f        ree)
     69 {
     70     if (malloc == NULL || free == NULL)
     71     {
     72         return;
     73     }
     74     g_pcre_malloc = malloc;
     75     g_pcre_free = free;
     76 }
static void* LocalPcreMalloc(size_t aSize)
     78 {
     79       if (NULL == g_pcre_malloc)
     80       {
     81           printf("pcre malloc is null\r\n");
     82           return NULL;
     83       }
     84     
     85     return g_pcre_malloc(aSize);
     86 }
     87 static void LocalPcreFree(void* aPtr)
     88 {
     89     if (g_pcre_free == NULL)
     90     {
     91         printf("pcre free is NULL\r\n");
     92         return;
     93     }
     94     g_pcre_free(aPtr);
     95 }
PCRE_EXP_DATA_DEFN void *(*PUBL(malloc))(size_t) = LocalPcreMalloc;
     98 PCRE_EXP_DATA_DEFN void  (*PUBL(free))(void *) = LocalPcreFree;
     99 PCRE_EXP_DATA_DEFN void *(*PUBL(stack_malloc))(size_t) =
LocalPcreMalloc;
    100 PCRE_EXP_DATA_DEFN void  (*PUBL(stack_free))(void *) = LocalPcreFree;
    101 PCRE_EXP_DATA_DEFN int   (*PUBL(callout))(PUBL(callout_block) *) =
NULL;
    102 PCRE_EXP_DATA_DEFN int   (*PUBL(stack_guard))(void) = NULL;
    103 



i compile the pcre in host mips64-octeon-linux-gnu to get the lib, and before
i use pcre_compile, i register the LocalPcreMalloc with "kmalloc"

i use it in http user-agent pcap identify, when comes a http pcap with a
user-agent,i
use pcre_exec to match,first about 6miniutes ,the return value is 0 ,never
match,but after 6miniutes ,it starts match, and get got value 9 or -1 and its
right,why the start 6miniutes return 0 in pcre_exec?

--
You are receiving this mail because:
You are on the CC list for the bug.