From: Paul H. Hargrove (PHHargrove_at_lbl_dot_gov)
Date: Mon Dec 22 2008 - 12:41:34 PST
Neal Becker wrote: > On Monday 22 December 2008, Paul H. Hargrove wrote: >> With all due respect to the person who raised the question: a link failure >> is NOT any indication that such buffer overflows are present. It is an >> indication of a toolchain that creates implicit dependencies and broke >> linking of many shared libraries and dynamically loadable modules other >> than BLCR. >> >> Neal, have you or anyone else tried removing -fno-stack-protector to see if >> things work correctly on Fedora 9 or 10? Its possible they might. >> >> If somebody can point to the proper way to resolve the linkage problem, >> without also breaking things for platforms w/o stack-protector support in >> gcc, then I'd be happy to apply the fix. >> > > I could try it, but how does it break? I'm asking because if it only breaks > on some arch, does it break in compile? Or only runtime? If the former, I > could easily try to build it using the compile farms already available. If it > only breaks in testing, I'd have to do some more. > Neal, Please see the BLCR bug report for details on the original failure: http://upc-bugs.lbl.gov/bugzilla/show_bug.cgi?id=1854 When trying to restore -fstack-protector, note that there are two one-line changes required (see attached patch). -Paul -- Paul H. Hargrove PHHargrove_at_lbl_dot_gov Future Technologies Group HPC Research Department Tel: +1-510-495-2352 Lawrence Berkeley National Laboratory Fax: +1-510-486-6900 Index: configure.ac =================================================================== RCS file: /var/local/cvs/lbnl_cr/configure.ac,v retrieving revision 1.408 diff -u -r1.408 configure.ac --- configure.ac 17 Dec 2008 04:02:37 -0000 1.408 +++ configure.ac 22 Dec 2008 19:58:39 -0000 @@ -435,7 +435,7 @@ CR_LIBCR_CFLAGS="" CR_TRY_GCC_FLAG([-Wall], [CR_LIBCR_CFLAGS="$CR_LIBCR_CFLAGS -Wall"]) CR_TRY_GCC_FLAG([-Wno-unused-function], [CR_LIBCR_CFLAGS="$CR_LIBCR_CFLAGS -Wno-unused-function"]) -CR_TRY_GCC_FLAG([-fno-stack-protector], [CR_LIBCR_CFLAGS="$CR_LIBCR_CFLAGS -fno-stack-protector"]) +#CR_TRY_GCC_FLAG([-fno-stack-protector], [CR_LIBCR_CFLAGS="$CR_LIBCR_CFLAGS -fno-stack-protector"]) AC_SUBST(CR_LIBCR_CFLAGS) fi # cr_build_libcr Index: libcr/Makefile.am =================================================================== RCS file: /var/local/cvs/lbnl_cr/libcr/Makefile.am,v retrieving revision 1.30 diff -u -r1.30 Makefile.am --- libcr/Makefile.am 11 Dec 2008 06:46:23 -0000 1.30 +++ libcr/Makefile.am 22 Dec 2008 19:58:39 -0000 @@ -3,7 +3,7 @@ CR_LIB_VERSION = -version-info @LIBTOOL_INTERFACE@:@LIBTOOL_REVISION@:@LIBTOOL_AGE@ # For bug 1854: must squash -fstack-protector when building the shared library -override CFLAGS := $(shell echo '$(CFLAGS)' | sed 's/-fstack-protector\(-all\)\?//g;') +#override CFLAGS := $(shell echo '$(CFLAGS)' | sed 's/-fstack-protector\(-all\)\?//g;') noinst_HEADERS = \ cr_syscall.h\