Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Failing ssp tests



Hello,

I'm seeing some odd behavior in the src/tests/lib/libc/ssp tests: when
built with USETOOLS=no, they work as intended, but when built as part
of a release, they all fail.  It looks like as if ssp was being
properly enabled in the former case but not the latter.

As an example, doing "echo adlkfjldskfjd | ./h_fgets 11" in
src/tests/lib/libc/ssp results in a crash with the binary built with
USETOOLS=no, but not with the one built with nbmake-amd64 (i.e. the
ones I have in destdir or in /usr/tests/lib/libc/ssp).

This is with sources as of yesterday with fresh obj, tools and destdir
directories.  Running on an amd64.

If this helps, the command lines used to build h_fgets in both cases:

desky:~/os/netbsd/src/tests/lib/libc/ssp>
~/os/netbsd/tools.amd64/bin/nbmake-amd64 h_fgets
/home/jmmv/os/netbsd/tools.amd64/bin/x86_64--netbsd-ar cr libssp_nonshared.a
rm -f .gdbinit
echo "set solib-absolute-prefix /home/jmmv/os/netbsd/destdir.amd64" > .gdbinit
#   compile  ssp/h_fgets.o
/home/jmmv/os/netbsd/tools.amd64/bin/x86_64--netbsd-gcc -O2 -pipe
-fstack-protector-all -Wstack-protector -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Wno-sign-compare
-Wno-traditional -Wa,--fatal-warnings -Wreturn-type -Wswitch -Wshadow
-Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter
-Wsign-compare -std=gnu99  -Werror    -D_FORTIFY_SOURCE=2  -nostdinc
-isystem /home/jmmv/os/netbsd/destdir.amd64/usr/include -c
/s/jmmv/os/netbsd/src/tests/lib/libc/ssp/h_fgets.c
#      link  ssp/h_fgets
/home/jmmv/os/netbsd/tools.amd64/bin/x86_64--netbsd-gcc
-B/home/jmmv/os/netbsd/destdir.amd64/usr/lib/
-B/home/jmmv/os/netbsd/destdir.amd64/usr/lib/  -Wl,-nostdlib
-fstack-protector-all -Wstack-protector -L. -Wl,--fatal-warnings
-o h_fgets  h_fgets.o
-L/home/jmmv/os/netbsd/destdir.amd64/usr/lib
-Wl,-rpath-link,/home/jmmv/os/netbsd/destdir.amd64/lib
-L/home/jmmv/os/netbsd/destdir.amd64/lib
-Wl,-rpath-link,/home/jmmv/os/netbsd/destdir.amd64/usr/lib
-L/home/jmmv/os/netbsd/destdir.amd64/usr/lib

desky:~/os/netbsd/src/tests/lib/libc/ssp> make USETOOLS=no h_fgets
ar cr libssp_nonshared.a
rm -f .gdbinit
touch .gdbinit
#   compile  ssp/h_fgets.o
cc -O2 -pipe -fstack-protector-all -Wstack-protector -Wall
-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
-Wno-sign-compare -Wno-traditional -Wa,--fatal-warnings -Wreturn-type
-Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra
-Wno-unused-parameter -Wsign-compare -std=gnu99  -Werror
-D_FORTIFY_SOURCE=2   -c    h_fgets.c
#      link  ssp/h_fgets
cc      -fstack-protector-all -Wstack-protector -L.
-Wl,--fatal-warnings     -o h_fgets  h_fgets.o
-Wl,-rpath-link,/lib  -L/lib -Wl,-rpath-link,/usr/lib  -L/usr/lib

Any ideas?

Thanks,

-- 
Julio Merino / @jmmv


Home | Main Index | Thread Index | Old Index