This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

A bug in ld-collate.c


Hi,

When using symbolic ellipsis in collating statement, such as
     startchar
     ..
     endchar
localedef complains that all the characters expended from the ellipsis
except the first one are already defined, despite they are not. I traced
the problem into "handle_ellipsis" function in ld-collate.c file. Please
look at the following 4 lines of code (Line#1263-1267 in ld-collate.c in
glibc-2.1.91 release):

	/* Generate the the name.  */
	sprintf (buf + preflen, base == 10 ? "%d" : "%x", from);

	/* Look whether this name is already defined.  */
	if (find_entry (&collate->seq_table, symstr, symlen,
	                                     ^^^^^^

I believe that "symstr" in the last line should be "buf" instead. It
meant to check the newly generated name, not "symstr" which always
points to the name of endchar and this name was already inserted into
the hash table before the loop.

Yong Li


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]