Skip to content

Commit

Permalink
Merge commit 'origin/master' into fedora/master
Browse files Browse the repository at this point in the history
Conflicts:
	sysdeps/powerpc/powerpc64/____longjmp_chk.S
	sysdeps/unix/sysv/linux/powerpc/powerpc64/____longjmp_chk.S
  • Loading branch information
Andreas Schwab committed Aug 24, 2009
2 parents 593eff0 + a0e25a8 commit 255acd1
Show file tree
Hide file tree
Showing 19 changed files with 386 additions and 117 deletions.
41 changes: 36 additions & 5 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
2009-08-23 Ulrich Drepper <drepper@redhat.com>

* posix/regcomp.c (parse_dup_op): Verify the expression is correctly
terminated.
* posix/Makefile (tests): Add bug-regex29.
* posix/bug-regex29.c: New file.

* posix/unistd.h: Define _POSIX_VERSION and _POSIX2_* correctly if
older POSIX versions are selected.

* stdio-common/printf_fp.c: ISO C expects to print the sign of NaN
as well.
* stdio-common/printf_fphex.c: Likewise.
* stdio-common/tstdiomisc.c: Add more tests.

* locale/locale.h: Include xlocale.h and the thread-local locale
declarations for XPG7, not XPG6.

2009-08-21 Andreas Schwab <schwab@redhat.com>

* sysdeps/powerpc/powerpc32/____longjmp_chk.S: Removed.
* sysdeps/powerpc/powerpc64/____longjmp_chk.S: Removed.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/____longjmp_chk.S: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/____longjmp_chk.S: New file.
* sysdeps/powerpc/powerpc32/__longjmp-common.S: Move CHECK_SP earlier.
* sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S: Likewise.

2009-08-20 Roland McGrath <roland@redhat.com>

* sysdeps/generic/elf/backtracesyms.c (__backtrace_symbols):
Use l_addr instead of l_map_start (dli_fbase).
Print "FILE([+-]OFFSET) [ADDRESS]" with the file-relative
address when there is no proximate symbol.
* sysdeps/generic/elf/backtracesymsfd.c (__backtrace_symbols_fd):
Likewise.

2009-08-16 Ulrich Drepper <drepper@redhat.com>

* scripts/gen-as-const.awk: Fix test for 64-bit platform.
Expand Down Expand Up @@ -665,11 +701,6 @@
* timezone/zic.c (stringzone): Don't try to generate a POSIX TZ
string when the timezone ends in DST.

* sysdeps/powerpc/powerpc32/____longjmp_chk.S (CHECK_SP): Save lr
before call.
* sysdeps/powerpc/powerpc64/____longjmp_chk.S (CHECK_SP):
Likewise.

2009-06-26 Ulrich Drepper <drepper@redhat.com>

* resolv/resolv.h: Define RES_SNGLKUPREOP.
Expand Down
2 changes: 1 addition & 1 deletion locale/locale.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ extern struct lconv *localeconv (void) __THROW;
__END_NAMESPACE_STD


#ifdef __USE_XOPEN2K
#ifdef __USE_XOPEN2K8
/* The concept of one static locale per category is not very well
thought out. Many applications will need to process its data using
information from several different locales. Another application is
Expand Down
4 changes: 4 additions & 0 deletions nptl/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2009-08-23 Ulrich Drepper <drepper@redhat.com>

* sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.

2009-08-11 Ulrich Drepper <drepper@redhat.com>

* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
Expand Down
10 changes: 6 additions & 4 deletions nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,17 @@
/* We support priority inheritence. */
#define _POSIX_THREAD_PRIO_INHERIT 200809L

/* We support priority inheritence for robust mutexes. */
#define _POSIX_THREAD_ROBUST_PRIO_INHERIT 200809L

/* We support priority protection, though only for non-robust
mutexes. */
#define _POSIX_THREAD_PRIO_PROTECT 200809L

#ifdef __USE_XOPEN2K8
/* We support priority inheritence for robust mutexes. */
# define _POSIX_THREAD_ROBUST_PRIO_INHERIT 200809L

/* We do not support priority protection for robust mutexes. */
#define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1
# define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1
#endif

/* We support POSIX.1b semaphores. */
#define _POSIX_SEMAPHORES 200809L
Expand Down
7 changes: 7 additions & 0 deletions nptl_db/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2009-08-23 Roland McGrath <roland@redhat.com>

* td_ta_map_lwp2thr.c (__td_ta_lookup_th_unique): Move ta_ok check
and LOG call back to ...
(td_ta_map_lwp2thr): ... here.
Reported by Maciej W. Rozycki <macro@codesourcery.com>.

2009-05-25 Aurelien Jarno <aurelien@aurel32.net>

[BZ #10200]
Expand Down
14 changes: 7 additions & 7 deletions nptl_db/td_ta_map_lwp2thr.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Which thread is running on an LWP?
Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
Copyright (C) 2003,2004,2007,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -33,12 +33,6 @@ __td_ta_lookup_th_unique (const td_thragent_t *ta_arg,
prgregset_t regs;
psaddr_t addr;

LOG ("td_ta_map_lwp2thr");

/* Test whether the TA parameter is ok. */
if (! ta_ok (ta))
return TD_BADTA;

if (ta->ta_howto == ta_howto_unknown)
{
/* We need to read in from the inferior the instructions what to do. */
Expand Down Expand Up @@ -181,6 +175,12 @@ td_ta_map_lwp2thr (const td_thragent_t *ta_arg,
{
td_thragent_t *const ta = (td_thragent_t *) ta_arg;

LOG ("td_ta_map_lwp2thr");

/* Test whether the TA parameter is ok. */
if (! ta_ok (ta))
return TD_BADTA;

/* We cannot rely on thread registers and such information at all
before __pthread_initialize_minimal has gotten far enough. They
sometimes contain garbage that would confuse us, left by the kernel
Expand Down
1 change: 1 addition & 0 deletions posix/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ tests := tstgetopt testfnm runtests runptests \
bug-regex17 bug-regex18 bug-regex19 bug-regex20 \
bug-regex21 bug-regex22 bug-regex23 bug-regex24 \
bug-regex25 bug-regex26 bug-regex27 bug-regex28 \
bug-regex29 \
tst-nice tst-nanosleep tst-regex2 \
transbug tst-rxspencer tst-pcre tst-boost \
bug-ga1 tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \
Expand Down
15 changes: 15 additions & 0 deletions posix/bug-regex29.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include <regex.h>

static int
do_test (void)
{
regex_t r;
int e = regcomp(&r, "xy\\{4,5,7\\}zabc", 0);
char buf[100];
regerror(e, &r, buf, sizeof (buf));
printf ("e = %d (%s)\n", e, buf);
return e != REG_BADBR;
}

#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
2 changes: 1 addition & 1 deletion posix/regcomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2481,7 +2481,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
return elem;
}

if (BE (end != -1 && start > end, 0))
if (BE ((end != -1 && start > end) || token->type != OP_CLOSE_DUP_NUM, 0))
{
/* First number greater than second. */
*err = REG_BADBR;
Expand Down
40 changes: 34 additions & 6 deletions posix/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,58 @@ __BEGIN_DECLS
/* These may be used to determine what facilities are present at compile time.
Their values can be obtained at run time from `sysconf'. */

#ifdef __USE_XOPEN2K8
/* POSIX Standard approved as ISO/IEC 9945-1 as of September 2008. */
#define _POSIX_VERSION 200809L
# define _POSIX_VERSION 200809L
#elif defined __USE_XOPEN2K
/* POSIX Standard approved as ISO/IEC 9945-1 as of December 2001. */
# define _POSIX_VERSION 200112L
#elif defined __USE_POSIX199506
/* POSIX Standard approved as ISO/IEC 9945-1 as of June 1995. */
# define _POSIX_VERSION 199506L
#elif defined __USE_POSIX199309
/* POSIX Standard approved as ISO/IEC 9945-1 as of September 1993. */
# define _POSIX_VERSION 199309L
#else
/* POSIX Standard approved as ISO/IEC 9945-1 as of September 1990. */
# define _POSIX_VERSION 199009L
#endif

/* These are not #ifdef __USE_POSIX2 because they are
in the theoretically application-owned namespace. */

#ifdef __USE_XOPEN2K8
# define __POSIX2_THIS_VERSION 200809L
/* The utilities on GNU systems also correspond to this version. */
#elif defined __USE_XOPEN2K
/* The utilities on GNU systems also correspond to this version. */
# define __POSIX2_THIS_VERSION 200112L
#elif defined __USE_POSIX199506
/* The utilities on GNU systems also correspond to this version. */
# define __POSIX2_THIS_VERSION 199506L
#else
/* The utilities on GNU systems also correspond to this version. */
# define __POSIX2_THIS_VERSION 199209L
#endif

/* The utilities on GNU systems also correspond to this version. */
#define _POSIX2_VERSION 200809L
#define _POSIX2_VERSION __POSIX2_THIS_VERSION

/* If defined, the implementation supports the
C Language Bindings Option. */
#define _POSIX2_C_BIND 200809L
#define _POSIX2_C_BIND __POSIX2_THIS_VERSION

/* If defined, the implementation supports the
C Language Development Utilities Option. */
#define _POSIX2_C_DEV 200809L
#define _POSIX2_C_DEV __POSIX2_THIS_VERSION

/* If defined, the implementation supports the
Software Development Utilities Option. */
#define _POSIX2_SW_DEV 200809L
#define _POSIX2_SW_DEV __POSIX2_THIS_VERSION

/* If defined, the implementation supports the
creation of locales with the localedef utility. */
#define _POSIX2_LOCALEDEF 200809L
#define _POSIX2_LOCALEDEF __POSIX2_THIS_VERSION

/* X/Open version number to which the library conforms. It is selectable. */
#ifdef __USE_XOPEN2K8
Expand Down
9 changes: 6 additions & 3 deletions stdio-common/printf_fp.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <float.h>
#include <gmp-mparam.h>
#include <gmp.h>
#include <ieee754.h>
#include <stdlib/gmp-impl.h>
#include <stdlib/longlong.h>
#include <stdlib/fpioconst.h>
Expand Down Expand Up @@ -335,6 +336,8 @@ ___printf_fp (FILE *fp,
/* Check for special values: not a number or infinity. */
if (__isnanl (fpnum.ldbl))
{
union ieee854_long_double u = { .d = fpnum.ldbl };
is_neg = u.ieee.negative != 0;
if (isupper (info->spec))
{
special = "NAN";
Expand All @@ -345,10 +348,10 @@ ___printf_fp (FILE *fp,
special = "nan";
wspecial = L"nan";
}
is_neg = 0;
}
else if (__isinfl (fpnum.ldbl))
{
is_neg = fpnum.ldbl < 0;
if (isupper (info->spec))
{
special = "INF";
Expand All @@ -359,7 +362,6 @@ ___printf_fp (FILE *fp,
special = "inf";
wspecial = L"inf";
}
is_neg = fpnum.ldbl < 0;
}
else
{
Expand All @@ -379,7 +381,8 @@ ___printf_fp (FILE *fp,
/* Check for special values: not a number or infinity. */
if (__isnan (fpnum.dbl))
{
is_neg = 0;
union ieee754_double u = { .d = fpnum.dbl };
is_neg = u.ieee.negative != 0;
if (isupper (info->spec))
{
special = "NAN";
Expand Down
4 changes: 2 additions & 2 deletions stdio-common/printf_fphex.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ __printf_fphex (FILE *fp,
/* Check for special values: not a number or infinity. */
if (__isnanl (fpnum.ldbl.d))
{
negative = fpnum.ldbl.ieee.negative != 0;
if (isupper (info->spec))
{
special = "NAN";
Expand All @@ -182,7 +183,6 @@ __printf_fphex (FILE *fp,
special = "nan";
wspecial = L"nan";
}
negative = 0;
}
else
{
Expand Down Expand Up @@ -211,6 +211,7 @@ __printf_fphex (FILE *fp,
/* Check for special values: not a number or infinity. */
if (__isnan (fpnum.dbl.d))
{
negative = fpnum.dbl.ieee.negative != 0;
if (isupper (info->spec))
{
special = "NAN";
Expand All @@ -221,7 +222,6 @@ __printf_fphex (FILE *fp,
special = "nan";
wspecial = L"nan";
}
negative = 0;
}
else
{
Expand Down
Loading

0 comments on commit 255acd1

Please sign in to comment.