Skip site navigation (1) Skip section navigation (2)

segmentation fault in function

From: Sergej Galkin <sergej(dot)galkin(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: segmentation fault in function
Date: 2010-01-13 19:53:30
Message-ID: dfebc1f11001131153rd60155dn98924b5e4850083a@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
I am realizing gist index and get a bug, that crashes DB. I' debugged my
program as Robert(thanks !) advised me and I know which procedure crashed.

*Datum gist_mov_consistent(PG_FUNCTION_ARGS)*
*{*
*    GISTENTRY *entry = (GISTENTRY *)PG_GETARG_POINTER(0);*
*    BOX *query = PG_GETARG_BOX_P(1);*
*    StrategyNumber strategy = (StrategyNumber)PG_GETARG_UINT16(2);*
*    *
*    if (DatumGetMovP(entry->key) == NULL || query == NULL)*
*        PG_RETURN_BOOL(FALSE);*
*    *
*    PG_RETURN_BOOL(obj_contains(DatumGetMovP(entry->key), query));*
*}*

*int obj_contains(moving_object *a, BOX *b)*
*{*
*    *
*    if (b->low.x > a->x_low)*
*        return 0;*
*    if (b->low.y > a->y_low)*
*        return 0;*
*    if (b->high.x < a->x_high)*
*        return 0;*
*    if (b->high.y < a->y_high)*
*        return 0;*
*    return 1;*
*}
**
Do you have any ideas ?**

Best regards,
Sergej Galkin
*

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-01-13 19:54:49
Subject: Re: [PATCH] remove redundant ownership checks
Previous:From: Robert HaasDate: 2010-01-13 19:46:41
Subject: Re: [PATCH] remove redundant ownership checks

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group