[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-user: pcb git segmentation fault in hid binary searchs



   Hi all,
   In trying to compile the git master branch of PCB on Ubuntu, I'm
   running into a segmentation fault in the hid/common/flags.c during
   compilation.
   I've tracked the problem to the binary search in hid_find_flag, when
   strcmp gets a null value from the flags being searched.  This may be a
   recent change in glibc for Ubuntu and a test program that just does
   strcmp("some string",NULL); segfaults for me.  I've changed it to use
   bsearch for now... my question is, is there a reason the stdlib
   bsearch function was not used?  I notice that qsort is used right
   above it.  If there is no complaint in changing the bsearch's in
   flags.c and actions.c, I'll submit a patch for it.
   Also, question in actions.c... It appears that the binary search is
   performed and a linear search is done if the action was not found in
   the binary search. Is there a reason for this or was it just
   overlooked in the hid upgrade?
   Thanks,
   Jason

_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user