Menu

#61 xsb_parse_string_string("true.",...)

Core Dump
closed-fixed
nobody
5
2003-04-21
2002-11-13
No

xsb_parse_string_string causes a memory access
violation when the query succed but there is not any
variable on it:

simple.c_______________________________

#include <stdlib.h>
#include <stdio.h>
#include <cinterf.h>

int main() {
XSB_StrDefine(str);
xsb_init_string("/home/salva/XSB/debug/2.5 -n");
xsb_query_string_string("true.", &str, "::");
printf("result: %s\n", str.string);
return 0;
}

Makefile________________________________
CFLAGS=-I/home/salva/XSB/2.5/emu \ -I/home/salva/XSB/2.5/config/i686-pc-linux-gnu \ -fomit-frame-pointer -finline-functions \ -Winline -Wall

LDLIBS=-lm -ldl

simple: simple.o \ /home/salva/XSB/2.5/config/i686-pc-linux-gnu/saved.o/xsb.o________________________________________

Bye!

- Salva

Discussion

  • David S. Warren

    David S. Warren - 2002-12-10

    Logged In: YES
    user_id=13069

    Luis says this segfaults in p2c_arity of true/0. I've conditioned
    this call to be made only if the argument is a proper psc
    structure. This should fix this problem.

     
  • David S. Warren

    David S. Warren - 2002-12-10
    • summary: xsb_parse_string_string("true.",...) --> xsb_parse_string_string("true.",...)
     
  • Luis Castro

    Luis Castro - 2003-04-18
    • summary: xsb_parse_string_string("true.",...) --> xsb_parse_string_string("true.",...)
    • status: open --> closed
     
  • Luis Castro

    Luis Castro - 2003-04-21
    • summary: xsb_parse_string_string("true.",...) --> xsb_parse_string_string("true.",...)
    • status: closed --> closed-fixed
     

Log in to post a comment.