[Ltrace-devel] DWARF prototypes: handling symbol aliases

Petr Machata pmachata at redhat.com
Thu Jul 10 21:00:14 UTC 2014


Dima Kogan <lists at dima.secretsauce.net> writes:

>> We could actually store vectors in the hash table directly.
>
> The reason I did it this way was to reduce the memory inefficiency of
> the hash table. [...] Still want this change?

That's a good point.  I'm not decided one way or another, so let's keep
it the way you wrote it.

> In any case, the patch seems to work, but I'd be more comfortable if the
> test suite told me it was good. I see the same test/suite failures
> before and after, some non-deterministic. Do you know which tests
> specifically are good to look at for a change like this?

There are two tests in filters.exp that test specifically the -l stuff,
i.e. this sort of export list handling thing.

Non-determinism in ltrace has always been a problem.  It used to be much
worse, but there might still be latent bugs, or bugs that the kernels
other than those that I test on expose.  What's you configuration, and
what failures are you seeing?


OK, so I tried to merge and do a test build, and am now getting this:

/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I/home/petr/proj/ltrace/master/64/..  -DSYSCONFDIR=\"/usr/local/etc\" 	-DPKGDATADIR=\"/usr/local/share/ltrace\" 	 	-I/home/petr/proj/ltrace/master/64/../sysdeps/linux-gnu/x86 	-I/home/petr/proj/ltrace/master/64/../sysdeps/linux-gnu 	-I/home/petr/proj/ltrace/master/64/../sysdeps 	-I/home/petr/proj/ltrace/master/64/..   -Wall -Wsign-compare -Wfloat-equal -Wformat-security -Werror -g -O2 -MT library.lo -MD -MP -MF .deps/library.Tpo -c -o library.lo /home/petr/proj/ltrace/master/64/../library.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/home/petr/proj/ltrace/master/64/.. -DSYSCONFDIR=\"/usr/local/etc\" -DPKGDATADIR=\"/usr/local/share/ltrace\" -I/home/petr/proj/ltrace/master/64/../sysdeps/linux-gnu/x86 -I/home/petr/proj/ltrace/master/64/../sysdeps/linux-gnu -I/home/petr/proj/ltrace/master/64/../sysdeps -I/home/petr/proj/ltrace/master/64/.. -Wall -Wsign-compare -Wfloat-equal -Wformat-security -Werror -g -O2 -MT library.lo -MD -MP -MF .deps/library.Tpo -c /home/petr/proj/ltrace/master/64/../library.c  -fPIC -DPIC -o .libs/library.o
/home/petr/proj/ltrace/master/64/../library.c: In function 'dtor_vect':
/home/petr/proj/ltrace/master/64/../library.c:345:2: error: passing argument 1 of 'vect_destroy' discards 'const' qualifier from pointer target type [-Werror]
/home/petr/proj/ltrace/master/64/../vect.h:143:6: note: expected 'struct vect *' but argument is of type 'const struct vect *'
/home/petr/proj/ltrace/master/64/../library.c:346:2: error: passing argument 1 of 'free' discards 'const' qualifier from pointer target type [-Werror]
/usr/include/stdlib.h:488:13: note: expected 'void *' but argument is of type 'const struct vect *'
/home/petr/proj/ltrace/master/64/../library.c: In function 'library_exported_names_destroy':
/home/petr/proj/ltrace/master/64/../library.c:366:132: error: initialization from incompatible pointer type [-Werror]
/home/petr/proj/ltrace/master/64/../library.c: In function 'library_exported_names_clone':
/home/petr/proj/ltrace/master/64/../library.c:380:207: error: initialization from incompatible pointer type [-Werror]
/home/petr/proj/ltrace/master/64/../library.c: In function 'library_exported_names_push':
/home/petr/proj/ltrace/master/64/../library.c:405:3: error: passing argument 1 of 'free' discards 'const' qualifier from pointer target type [-Werror]
/usr/include/stdlib.h:488:13: note: expected 'void *' but argument is of type 'const char *'
/home/petr/proj/ltrace/master/64/../library.c:437:3: error: passing argument 1 of 'free' discards 'const' qualifier from pointer target type [-Werror]
/usr/include/stdlib.h:488:13: note: expected 'void *' but argument is of type 'const char *'
/home/petr/proj/ltrace/master/64/../library.c: In function 'library_exported_names_each_alias':
/home/petr/proj/ltrace/master/64/../library.c:475:19: error: passing argument 1 of 'dict_find' discards 'const' qualifier from pointer target type [-Werror]
/home/petr/proj/ltrace/master/64/../dict.h:129:7: note: expected 'struct dict *' but argument is of type 'const struct dict *'
/home/petr/proj/ltrace/master/64/../library.c:481:59: error: passing argument 1 of 'dict_find' discards 'const' qualifier from pointer target type [-Werror]
/home/petr/proj/ltrace/master/64/../dict.h:129:7: note: expected 'struct dict *' but argument is of type 'const struct dict *'
/home/petr/proj/ltrace/master/64/../library.c: In function 'library_exported_names_contains':
/home/petr/proj/ltrace/master/64/../library.c:496:19: error: passing argument 1 of 'dict_find' discards 'const' qualifier from pointer target type [-Werror]
/home/petr/proj/ltrace/master/64/../dict.h:129:7: note: expected 'struct dict *' but argument is of type 'const struct dict *'
cc1: all warnings being treated as errors

Thanks,
PM



More information about the Ltrace-devel mailing list