Open nikhilgupta10 opened 7 years ago
nikhilgupta10 imported these comments from Sourceforge: "r-barnes":(Note: my custom code is not making such a change to my knowledge. It simply tries to observe the value of the randomvar.),
"jcfuller":- assigned_to: Andy Fisher
I am attempting to use a
randomvar
in a model, like so:where
evcharger_rand
is some of my own custom code.Running this model results in a segfault in
random.c
at Line 1301 whenvar->update_rate
tries to deferencevar
, whose address at this point is0x4052400000000000
.Tracing the issue back, it seems as though
var->next
on Line 1336 should be yielding aNULL
but isn't.Therefore, I investigated
randomvar_create()
at Line 1259. And found that it was called only once and thatvar->next
at that time wasNULL
.Looking in
convert_to_randomvar()
, I found thatvar->next
was0x4052400000000000
when this function was called.My conclusion is that
var->next
is getting altered sometime between the calls torandomvar_create()
andconvert_to_randomvar()
.,