Compile the following program with gcc and the resulting a.out causes a segmentation error. main(argc,argv) int argc; char * argv[]; { int ii = getopt(0,"","hm:n:c:aq"); } The cause is the first argumenet to getopt being zero. Normally argc and argv are passed in, and so you probably wouldn't get an argc of zero. However, one of our company's programmers decided to use zero to mean he wasn't interested in the options passed. It certainly shouldn't dump the core.
assign to jakub
Fixed in glibc 2.1.92