igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] C igraph, Non deterministic error in igraph_vector_size fun


From: Daniel Penalva
Subject: Re: [igraph] C igraph, Non deterministic error in igraph_vector_size functior
Date: Fri, 23 Jan 2015 17:07:32 -0200

Hi,

I solved the issue,  but i note a important thing:

igraph_adjlist_get is a macro, must have a pointer has the first argment and NOT a object. I think that is good to correct the doc of this macro.

http://igraph.org/c/doc/ch07.html#igraph_adjlist_get

Where it says adjlist object it must be >pointer< to adjlist object.

also, if iam using this macro inside a function, than i cannot access the pointer to adjlist object by a struct that was initialized somewhere else. So what i have done is the following:

void function(struct a *objct){
igraph_vector_int *v;
v = igraph_adjlist_get( &(a->adjlist), 0); // adjlist is initialized igraph_adjlist_t object
}

this compiles but have non-deterministic access memory issues

void function(igraph_adjlist_t adjlist){
igraph_vector_int *v;
v = igraph_adjlist_get( &adjlist, 0);
}

this works fine without issues


On Thu, Jan 22, 2015 at 6:11 PM, Tamas Nepusz <address@hidden> wrote:
> Non deterministic error in igraph_vector_size function
You are using igraph_vector_* functions on instances of igraph_vector_int_t in
one of your source files several times. Compile your code with all the warnings
turned on (use the -Wall switch for gcc) and you will see where this happens.

T.

_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help


reply via email to

[Prev in Thread] Current Thread [Next in Thread]