public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/14545] New: Many tests fail when linking statically
@ 2012-09-05 13:53 hjl.tools at gmail dot com
  2012-09-05 18:26 ` [Bug libc/14545] " hjl.tools at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: hjl.tools at gmail dot com @ 2012-09-05 13:53 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14545

             Bug #: 14545
           Summary: Many tests fail when linking statically
           Product: glibc
           Version: 2.17
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: unassigned@sourceware.org
        ReportedBy: hjl.tools@gmail.com
                CC: drepper.fsp@gmail.com
    Classification: Unclassified


After fixing PR 13679 on hjl/pr13679 branch, I configured glibc with
--disable-shared --disable-build-nscd on x86-64.  "make check" reports

make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/localedata/tst_mblen.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/localedata/tst_mbrlen.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/localedata/tst_mbrtowc.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/localedata/tst_mbsrtowcs.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/localedata/tst_mbstowcs.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/localedata/tst_mbtowc.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/localedata/tst_strcoll.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/localedata/tst_swscanf.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/localedata/tst_wcrtomb.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/localedata/tst_wcscoll.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/localedata/tst_wcsrtombs.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/localedata/tst_wcstombs.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/localedata/tst_wctob.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/localedata/tst_wctomb.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/localedata/bug-iconv-trans.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/localedata/bug-setlocale1.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/localedata/sort-test.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/catgets/test1.cat] Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/catgets/sample.SJIS.cat]
Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/catgets/de/libc.cat] Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/stdio-common/tst-swprintf.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/libio/tst-fopenloc.out]
Error 139
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/wcsmbs/tst-btowc.out] Error
1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/wcsmbs/tst-mbrtowc2.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/time/tst-strptime.out] Error
1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/posix/tst-rfc3484] Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/posix/tst-rfc3484-3] Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/posix/tst-rfc3484-2] Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/posix/bug-regex5.out] Error
1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/posix/tst-regex.out] Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/posix/bug-regex33.out] Error
1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/nptl/tst-basic3.out] Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/nptl/tst-raise1.out] Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/nptl/tst-join1.out] Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/nptl/tst-cancel7.out] Error
1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/nptl/tst-cancel21.out] Error
1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/nptl/tst-cancel24] Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/nptl/tst-unload] Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/nptl/tst-cancelx7.out] Error
1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/nptl/tst-cancelx21.out]
Error 1
make[4]: *** [/export/build/gnu/glibc-static/build-x86_64-linux/elf/rtld.os]
Error 1
make[4]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/elf/tst-leaks1-mem] Error 1
make[3]: ***
[/export/build/gnu/glibc-static/build-x86_64-linux/check-local-headers.out]
Error 2

Some of them are real bugs.  For example:

[hjl@gnu-6 build-x86_64-linux]$ gcc nptl/tst-cancelx21.o -lpthread 
[hjl@gnu-6 build-x86_64-linux]$ ./a.out 
sa_flags = 0 test
sa_flags = SA_ONSTACK test
sa_flags = SA_SIGINFO test
sa_flags = SA_SIGINFO|SA_ONSTACK test
[hjl@gnu-6 build-x86_64-linux]$ gcc nptl/tst-cancelx21.o -lpthread  -static
/usr/lib/gcc/x86_64-redhat-linux/4.7.1/../../../../lib64/libpthread.a(libpthread.o):
In function `sem_open':
(.text+0x67f8): warning: the use of `mktemp' is dangerous, better use `mkstemp'
[hjl@gnu-6 build-x86_64-linux]$ ./a.out 
sa_flags = 0 test
*** glibc detected *** ./a.out: free(): invalid pointer: 0x00000000006dbc60 ***
======= Backtrace: =========
[0x41cef8]
[0x43b3f1]
[0x402e30]
[0x404fb9]
[0x40262d]
[0x403e55]
[0x43a469]
======= Memory map: ========
[hjl@gnu-6 build-x86_64-linux]$

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/14545] Many tests fail when linking statically
  2012-09-05 13:53 [Bug libc/14545] New: Many tests fail when linking statically hjl.tools at gmail dot com
@ 2012-09-05 18:26 ` hjl.tools at gmail dot com
  2012-09-07 17:18 ` hjl.tools at gmail dot com
  2014-06-17  4:45 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: hjl.tools at gmail dot com @ 2012-09-05 18:26 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14545

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2012-09-05 18:25:56 UTC ---
It crashes at

(gdb) bt
#0  malloc_printerr (action=3, str=0x4a3079 "free(): invalid pointer", 
    ptr=0x6da000 <static_dtv>) at malloc.c:4950
#1  0x0000000000444c01 in _dl_deallocate_tls (tcb=tcb@entry=0x6dd880, 
    dealloc_tcb=dealloc_tcb@entry=false) at dl-tls.c:483
#2  0x0000000000403110 in __deallocate_stack (pd=pd@entry=0x6dd880)
    at allocatestack.c:749
#3  0x0000000000403ea9 in __free_tcb (pd=pd@entry=0x6dd880)
    at pthread_create.c:224
#4  0x0000000000405178 in pthread_join (threadid=threadid@entry=7198848, 
    thread_return=thread_return@entry=0x7ffff7ffcd58) at pthread_join.c:113
#5  0x00000000004027cd in tf (arg=0x6dd880) at tst-cancel21.c:133
#6  0x0000000000403f8f in start_thread (arg=0x7ffff7ffd700)
    at pthread_create.c:308
#7  0x0000000000443c69 in clone ()
(gdb) p dtv
$2 = (dtv_t *) 0x6da010 <static_dtv+16>
(gdb) 

Since dtv comes from,

static dtv_t static_dtv[2 + TLS_SLOTINFO_SURPLUS];

in csu/libc-tls.c,

  /* The array starts with dtv[-1].  */
#ifdef SHARED
  if (dtv != GL(dl_initial_dtv))
#endif
    free (dtv - 1); 

is incorrect.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/14545] Many tests fail when linking statically
  2012-09-05 13:53 [Bug libc/14545] New: Many tests fail when linking statically hjl.tools at gmail dot com
  2012-09-05 18:26 ` [Bug libc/14545] " hjl.tools at gmail dot com
@ 2012-09-07 17:18 ` hjl.tools at gmail dot com
  2014-06-17  4:45 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: hjl.tools at gmail dot com @ 2012-09-07 17:18 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14545

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |2.17

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2012-09-07 17:18:17 UTC ---
Most of failures are expected since they depend on DSO
which isn't enabled.  I will open bugs for real failures.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/14545] Many tests fail when linking statically
  2012-09-05 13:53 [Bug libc/14545] New: Many tests fail when linking statically hjl.tools at gmail dot com
  2012-09-05 18:26 ` [Bug libc/14545] " hjl.tools at gmail dot com
  2012-09-07 17:18 ` hjl.tools at gmail dot com
@ 2014-06-17  4:45 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2014-06-17  4:45 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=14545

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-06-17  4:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-05 13:53 [Bug libc/14545] New: Many tests fail when linking statically hjl.tools at gmail dot com
2012-09-05 18:26 ` [Bug libc/14545] " hjl.tools at gmail dot com
2012-09-07 17:18 ` hjl.tools at gmail dot com
2014-06-17  4:45 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).