While playing around with Debug.locate_references i noticed that it fails on ({}). The problem seems to be that in print_short_svalue_compact the svalue is not completely initialized and at some later point s->subtype is added to a pointer. 1-line patch attached.
There is another problem when the master is printed during a run of locate_references. As the one before it can be triggered by Debug.locate_references(({})) but only after fixing the first bug. The current_path variable inherited from the 7.4 compat master is type PIKE_T_FREE for some reason and describe_svalue doesnt like that. If pike is compiled with dmalloc, pike segfaults because the free location of current_path seems to be uninitialized, too. Not sure where to fix that.
arne
diff --git a/src/svalue.c b/src/svalue.c index a6b07d1..273fc61 100644 --- a/src/svalue.c +++ b/src/svalue.c @@ -1871,6 +1871,7 @@ PMOD_EXPORT void print_short_svalue_compact (FILE *out, const union anything *a, else { struct svalue sval; sval.type = type; + sval.subtype = 0; sval.u = *a; print_svalue_compact (out, &sval); }
While playing around with Debug.locate_references i noticed that it fails on ({}). The problem seems to be that in print_short_svalue_compact the svalue is not completely initialized and at some later point s->subtype is added to a pointer. 1-line patch attached.
Your fix is correct and applied, thanks.
/.../ The current_path variable inherited from the 7.4 compat master is type PIKE_T_FREE for some reason and describe_svalue doesnt like that. /.../
The problem was that low_describe_something had not been teached about the new extern variable concept. Fixed support for getters and setters in it as well.
pike-devel@lists.lysator.liu.se