[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: PCB: DRC segfault on a ratline
On 11/19/09, Peter Clifton <pcjc2@xxxxxxxxx> wrote:
> I tried it, and couldn't reproduce a crash, neither under gdb or
> valgrind. What are the steps to reproduce?
I had reproduced it faultlessly on two different machines
with different GUIs before I reported; after your post
I went to a third and reproduced it so that now I'm quite sure
I have tested all three GUIs, the batch, the Lesstif and the GTK one.
I run pcb tut1.pcb and enter `:drc'; with GTK it segfaults
instantly, with other GUIs you have to skip several errors.
> I'm willing to accept that the patch might be good;
I was not quite sure; I just pointed to the offending code.
> but I'm curious what
> code-path was executing, and what the DRC error was which triggered the
> issue..
When BuildObjectList is called with thing_type being
unenumerated, it returns NULL in object_id_list,
then the program free()s it and that does not make
a segmentation fault, because standard free()
is so generous about NULLs.
However, when we have got an unenumerated thing_type,
object_type_list remains unassigned, and eo sunt leones.
> why is a RATLINE playing a part in a DRC violation?
I didn't know; perhaps, because ratlines may be included in the report.
> From my quick scan of find.c, I can't see any DRC checks which ought to
> involve rat-lines.
But I can see `SetThing (RATLINE_TYPE'; it is indirectly issued
from many places.
> As far as I can see, ignoring an object type - and just returning is
> should not be fatal - unless perhaps the fact nothing is returned -
> causes a crash elsewhere. If that is the case, I want to fix it.
I don't feel nullifying object_type_list would be a more correct solution;
they both may be combined, though.
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user