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

Re: Bug#546823: __thread usage in libcap-ng0 broken on armel if optimizing



It appears that the segfaults in libcap-ng0 described in my earlier bug report,
caused by (or at least related to) use of R_ARM_GOTOFF32 relocations with
TLS symbols, can be avoided by compiling libcap-ng without optimization.
I attach an interdiff; for your convenience, it also includes fixes for the
two minor bugs I just reported.

I suspect that the R_ARM_GOTOFF32 thing may be a bug in gcc or some other
toolchain component (perhaps gcc is applying an inappropriate optimization?),
but I've run out of toolchain knowledge. Is there a toolchain or ARM guru who
can pick this up?

Thanks,
    Simon

diff -u libcap-ng-0.6.2/debian/changelog libcap-ng-0.6.2/debian/changelog
--- libcap-ng-0.6.2/debian/changelog
+++ libcap-ng-0.6.2/debian/changelog
@@ -1,3 +1,15 @@
+libcap-ng (0.6.2-1.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Don't optimize on armel, to work around overly aggressive optimization (?)
+    on __thread variable. Closes: #546823
+  * Fix NAME sections of man pages so whatis can understand them (Lintian
+    warning).
+  * Install .pc file so pkg-config can be used to find libcap-ng (dh_install
+    warning).
+
+ -- Simon McVittie <smcv@debian.org>  Thu, 22 Oct 2009 22:22:28 +0000
+
 libcap-ng (0.6.2-1) unstable; urgency=low
 
   * New upstream release
diff -u libcap-ng-0.6.2/debian/rules libcap-ng-0.6.2/debian/rules
--- libcap-ng-0.6.2/debian/rules
+++ libcap-ng-0.6.2/debian/rules
@@ -23,7 +23,10 @@
 PYDEF=$(shell pyversions -d)
 PYVERS=$(shell pyversions -r)
 
-
+# armel compiler doesn't seem to do too well at __thread if optimizing
+ifeq ($(DEB_BUILD_GNU_TYPE),arm-linux-gnueabi)
+CFLAGS += -O0
+endif
 
 # shared library versions, option 1
 version=2.0.5
diff -u libcap-ng-0.6.2/debian/libcap-ng-dev.install libcap-ng-0.6.2/debian/libcap-ng-dev.install
--- libcap-ng-0.6.2/debian/libcap-ng-dev.install
+++ libcap-ng-0.6.2/debian/libcap-ng-dev.install
@@ -3,4 +3,5 @@
 usr/lib/lib*.so
 usr/lib/*.la
+usr/lib/pkgconfig/*.pc
 usr/share/aclocal/*
 usr/share/man/man3/*
only in patch2:
unchanged:
--- libcap-ng-0.6.2.orig/docs/capng_set_caps_fd.3
+++ libcap-ng-0.6.2/docs/capng_set_caps_fd.3
@@ -1,6 +1,6 @@
 .TH "CAPNG_SET_CAPS_FD" "3" "June 2009" "Red Hat" "Libcap-ng API"
 .SH NAME
-capng_set_caps_fd \- 
+capng_set_caps_fd \- write file-based capabilities to extended attributes
 .SH "SYNOPSIS"
 .B #include <cap-ng.h>
 .sp
only in patch2:
unchanged:
--- libcap-ng-0.6.2.orig/docs/capng_get_caps_fd.3
+++ libcap-ng-0.6.2/docs/capng_get_caps_fd.3
@@ -1,6 +1,6 @@
 .TH "CAPNG_GET_CAPS_FD" "3" "June 2009" "Red Hat" "Libcap-ng API"
 .SH NAME
-capng_get_caps_fd \- 
+capng_get_caps_fd \- read file-based capabilities from extended attributes
 .SH "SYNOPSIS"
 .B #include <cap-ng.h>
 .sp

Attachment: signature.asc
Description: Digital signature


Reply to: