Commit graph

5496 commits

Author SHA1 Message Date
Christopher Ferris
a59e16bac9 am 34c2a9fc: Move stack unwinding test into library.
* commit '34c2a9fc37848d446bf91ce61783884232fffeb1':
  Move stack unwinding test into library.
2013-09-30 14:46:05 -07:00
Christopher Ferris
427e8cf902 Fix line that got removed by merge.
(cherry picked from commit f14d71fcf7)

Change-Id: Id3dd54d9efd87ef2bbb2c90adae2ce3911695027
2013-09-29 22:14:56 -07:00
Elliott Hughes
967a6d3768 am ef8eb557: am 4d016c6a: Merge "Upgrade to tzcode2013f plus Android modifications (from tzcode2013d plus Android modifications)."
* commit 'ef8eb55708f67fc2977a155dddb1b3f1f732b3fe':
  Upgrade to tzcode2013f plus Android modifications (from tzcode2013d plus Android modifications).
2013-09-27 15:44:53 -07:00
Elliott Hughes
ef8eb55708 am 4d016c6a: Merge "Upgrade to tzcode2013f plus Android modifications (from tzcode2013d plus Android modifications)."
* commit '4d016c6a83bb8c8b8ec88400031b42c41f18edbb':
  Upgrade to tzcode2013f plus Android modifications (from tzcode2013d plus Android modifications).
2013-09-27 15:41:25 -07:00
Elliott Hughes
4d016c6a83 Merge "Upgrade to tzcode2013f plus Android modifications (from tzcode2013d plus Android modifications)." 2013-09-27 22:38:45 +00:00
Nick Kralevich
cadc6aaf41 am f56e0e4b: am 6aed6077: Merge "Fix unnecessary call to __strncpy_chk2"
* commit 'f56e0e4b5e97f4e7fed6e06dde30053ea687716e':
  Fix unnecessary call to __strncpy_chk2
2013-09-27 15:18:21 -07:00
Nick Kralevich
f56e0e4b5e am 6aed6077: Merge "Fix unnecessary call to __strncpy_chk2"
* commit '6aed6077fbe2b2039ab9160fb1e33ffe07907f32':
  Fix unnecessary call to __strncpy_chk2
2013-09-27 15:15:31 -07:00
Nick Kralevich
6aed6077fb Merge "Fix unnecessary call to __strncpy_chk2" 2013-09-27 22:13:19 +00:00
Nick Kralevich
d13c2b1ba6 Fix unnecessary call to __strncpy_chk2
If "n" is smaller than the size of "src", then we'll
never read off the end of src. It makes no sense to call
__strncpy_chk2 in those circumstances.

For example, consider the following code:

int main() {
  char src[10];
  char dst[5];
  memcpy(src, "0123456789", sizeof(src));
  strncpy(dst, src, sizeof(dst));
  dst[4] = '\0';
  printf("%s\n", dst);
  return 0;
}

In this code, it's clear that the strncpy will never read off
the end of src.

Change-Id: I9cf58857a0c5216b4576d21d3c1625e2913ccc03
2013-09-27 13:21:24 -07:00
Conley Owens
e83a780600 resolved conflicts for merge of f4af9110 to klp-dev-plus-aosp
Change-Id: I9e499e552b758392dd0c7b8d888944c0150dd22a
2013-09-27 13:13:30 -07:00
Nick Kralevich
9a622f874c am cc362291: am 8427b745: Merge "libc: fortify recvfrom()"
* commit 'cc362291362f8183431eccb19267c8a625f36006':
  libc: fortify recvfrom()
2013-09-27 09:11:00 -07:00
Nick Kralevich
cc36229136 am 8427b745: Merge "libc: fortify recvfrom()"
* commit '8427b7450fe068db6484d161f7004661c4698858':
  libc: fortify recvfrom()
2013-09-27 09:08:25 -07:00
Nick Kralevich
8427b7450f Merge "libc: fortify recvfrom()" 2013-09-27 16:05:44 +00:00
Elliott Hughes
e0d0b15de6 Upgrade to tzcode2013f plus Android modifications (from tzcode2013d plus Android modifications).
localtime.c and strftime.c are still quite different from upstream because of
our extensions, but the other files continue to be identical, and the two
exceptions should be otherwise identical.

From the tzcode2013e release notes:

  Changes affecting Godthab time stamps after 2037 if version mismatch

    Allow POSIX-like TZ strings where the transition time's hour can
    range from -167 through 167, instead of the POSIX-required 0
    through 24.  E.g., TZ='FJT-12FJST,M10.3.1/146,M1.3.4/75' for the
    new Fiji rules.  This is a more-compact way to represent
    far-future time stamps for America/Godthab, America/Santiago,
    Antarctica/Palmer, Asia/Gaza, Asia/Hebron, Asia/Jerusalem,
    Pacific/Easter, and Pacific/Fiji.  Other zones are unaffected by
    this change.  (Derived from a suggestion by Arthur David Olson.)

    Allow POSIX-like TZ strings where daylight saving time is in
    effect all year.  E.g., TZ='WART4WARST,J1/0,J365/25' for Western
    Argentina Summer Time all year.  This supports a more-compact way
    to represent the 2013d data for America/Argentina/San_Luis.
    Because of the change for San Luis noted above this change does not
    affect the current data.  (Thanks to Andrew Main (Zefram) for
    suggestions that improved this change.)

    Where these two TZ changes take effect, there is a minor extension
    to the tz file format in that it allows new values for the
    embedded TZ-format string, and the tz file format version number
    has therefore been increased from 2 to 3 as a precaution.
    Version-2-based client code should continue to work as before for
    all time stamps before 2038.  Existing version-2-based client code
    (tzcode, GNU/Linux, Solaris) has been tested on version-3-format
    files, and typically works in practice even for time stamps after
    2037; the only known exception is America/Godthab.

  Changes affecting API

    Support for floating-point time_t has been removed.
    It was always dicey, and POSIX no longer requires it.
    (Thanks to Eric Blake for suggesting to the POSIX committee to
    remove it, and thanks to Alan Barrett, Clive D.W. Feather, Andy
    Heninger, Arthur David Olson, and Alois Treindl, for reporting
    bugs and elucidating some of the corners of the old floating-point
    implementation.)

    The signatures of 'offtime', 'timeoff', and 'gtime' have been
    changed back to the old practice of using 'long' to represent UT
    offsets.  This had been inadvertently and mistakenly changed to
    'int_fast32_t'.  (Thanks to Christos Zoulos.)

    The code avoids undefined behavior on integer overflow in some
    more places, including gmtime, localtime, mktime and zdump.

  Changes affecting code internals

    Minor changes pacify GCC 4.7.3 and GCC 4.8.1.

  Changes affecting documentation and commentary

    Documentation and commentary is more careful to distinguish UT in
    general from UTC in particular.  (Thanks to Steve Allen.)

From the tzcode2013f release notes:

  Changes affecting API

    The types of the global variables 'timezone' and 'altzone' (if present)
    have been changed back to 'long'.  This is required for 'timezone'
    by POSIX, and for 'altzone' by common practice, e.g., Solaris 11.
    These variables were originally 'long' in the tz code, but were
    mistakenly changed to 'time_t' in 1987; nobody reported the
    incompatibility until now.  The difference matters on x32, where
    'long' is 32 bits and 'time_t' is 64.  (Thanks to Elliott Hughes.)

Change-Id: I14937c42a391ddb865e4d89f0783961bcc6baa21
2013-09-27 00:04:30 -07:00
Elliott Hughes
b1542b09d9 am 174e98c9: am ad1244b2: Merge "Upgrade to tzdata2013f."
* commit '174e98c9a96879af82e8bbda2d6322544fb74d90':
  Upgrade to tzdata2013f.
2013-09-26 23:34:10 -07:00
Elliott Hughes
174e98c9a9 am ad1244b2: Merge "Upgrade to tzdata2013f."
* commit 'ad1244b2e7588df2f4e66747e1355016d6d014bc':
  Upgrade to tzdata2013f.
2013-09-26 23:31:50 -07:00
Elliott Hughes
ad1244b2e7 Merge "Upgrade to tzdata2013f." 2013-09-27 06:30:00 +00:00
Elliott Hughes
1b709a946f am 3b7d4697: am abd4b254: Merge "Upgrade to tzdata2013e."
* commit '3b7d4697b765cb4cd65a1e306d27c607dc486d66':
  Upgrade to tzdata2013e.
2013-09-26 23:25:40 -07:00
Elliott Hughes
3b7d4697b7 am abd4b254: Merge "Upgrade to tzdata2013e."
* commit 'abd4b2542b0e161f40a80c48970b77097af76dd9':
  Upgrade to tzdata2013e.
2013-09-26 23:23:15 -07:00
Elliott Hughes
4ced7ef05a Upgrade to tzdata2013f.
From the release notes:

  Changes affecting near-future time stamps

    Tocantins will very likely not observe DST starting this spring.
    (Thanks to Steffen Thorsen.)

    Jordan will likely stay at UTC+3 indefinitely, and will not fall
    back this fall.

    Palestine will fall back at 00:00, not 01:00.  (Thanks to Steffen Thorsen.)

Change-Id: Iccee57578eef2ab51c519a23f151bc1963262ffe
2013-09-26 23:22:23 -07:00
Elliott Hughes
abd4b2542b Merge "Upgrade to tzdata2013e." 2013-09-27 06:20:18 +00:00
Elliott Hughes
35b123ef1e Upgrade to tzdata2013e.
From the release notes:

  Changes affecting near-future time stamps

    This year Fiji will start DST on October 27, not October 20.
    (Thanks to David Wheeler for the heads-up.)  For now, guess that
    Fiji will continue to spring forward the Sunday before the fourth
    Monday in October.

  Changes affecting time stamps before 1970

    Pacific/Johnston is now a link to Pacific/Honolulu.  This corrects
    some errors before 1947.

    Some zones have been turned into links, when they differ from
    existing zones only in older data that was likely invented or that
    differs only in LMT or transition from LMT.  These changes affect
    only time stamps before 1943.  The affected zones are:
    Africa/Juba, America/Anguilla, America/Aruba, America/Dominica,
    America/Grenada, America/Guadeloupe, America/Marigot,
    America/Montserrat, America/St_Barthelemy, America/St_Kitts,
    America/St_Lucia, America/St_Thomas, America/St_Vincent,
    America/Tortola, and Europe/Vaduz.  (Thanks to Alois Treindl for
    confirming that the old Europe/Vaduz zone was wrong and the new
    link is better for WWII-era times.)

    Change Kingston Mean Time from -5:07:12 to -5:07:11.  This affects
    America/Cayman, America/Jamaica and America/Grand_Turk time stamps
    from 1890 to 1912.

    Change the UT offset of Bern Mean Time from 0:29:44 to 0:29:46.
    This affects Europe/Zurich time stamps from 1853 to 1894.  (Thanks
    to Alois Treindl).

    Change the date of the circa-1850 Zurich transition from 1849-09-12
    to 1853-07-16, overriding Shanks with data from Messerli about
    postal and telegraph time in Switzerland.

  Data changes affecting behavior of tzselect and similar programs

    Country code BQ is now called the more-common name "Caribbean Netherlands"
    rather than the more-official "Bonaire, St Eustatius & Saba".

    Remove from zone.tab the names America/Montreal, America/Shiprock,
    and Antarctica/South_Pole, as they are equivalent to existing
    same-country-code zones for post-1970 time stamps.  The data for
    these names are unchanged, so the names continue to work as before.

Change-Id: If78a517687532afcc0b22c7df664b5955f6e1564
2013-09-26 22:41:09 -07:00
Christopher Ferris
6c4ef74757 am 7bfef355: Change hard-coded directory.
* commit '7bfef355b1590cb8ac68d8caa97eaf0018191db8':
  Change hard-coded directory.
2013-09-26 14:39:31 -07:00
Christopher Ferris
9018a0f462 am 6d1f85dc: Change hard-coded temporary directory.
* commit '6d1f85dcdcf32117332b48563357d311a2886c30':
  Change hard-coded temporary directory.
2013-09-26 14:39:30 -07:00
Elliott Hughes
5825f979b7 am 88f29444: am 7b538021: Merge "Make it easier to add syscalls for another architecture."
* commit '88f2944421839b725e02e97c62d119c9e608ec58':
  Make it easier to add syscalls for another architecture.
2013-09-26 09:02:46 -07:00
Elliott Hughes
88f2944421 am 7b538021: Merge "Make it easier to add syscalls for another architecture."
* commit '7b538021bdaa0a7c2d60e25d10e5908043680467':
  Make it easier to add syscalls for another architecture.
2013-09-26 09:01:20 -07:00
Elliott Hughes
7b538021bd Merge "Make it easier to add syscalls for another architecture." 2013-09-26 15:59:33 +00:00
Elliott Hughes
d612165c67 Make it easier to add syscalls for another architecture.
Much of the per-architecture duplication can be removed, so let's do so
before we add the 64-bit architectures.

Change-Id: Ieb796503c8e5353ea38c3bab768bb9a690c9a767
2013-09-26 08:57:17 -07:00
Elliott Hughes
fcdb47d7f5 am dbd4dbc0: am a1c1a334: Merge "Add a unit test for %n."
* commit 'dbd4dbc02c969531ff4891c06e66c63ec7a6d75d':
  Add a unit test for %n.
2013-09-25 22:16:18 -07:00
Elliott Hughes
dbd4dbc02c am a1c1a334: Merge "Add a unit test for %n."
* commit 'a1c1a3344de1c0a35126ea6f43e1d55184f078da':
  Add a unit test for %n.
2013-09-25 22:13:52 -07:00
Elliott Hughes
a1c1a3344d Merge "Add a unit test for %n." 2013-09-26 05:10:28 +00:00
Michael Wright
18c2cc68e8 am 92d512f6: am c612a133: Merge "Update capability.h"
* commit '92d512f6cf273d6d9e281dc362cc25cf8892b3f9':
  Update capability.h
2013-09-25 16:35:33 -07:00
Michael Wright
92d512f6cf am c612a133: Merge "Update capability.h"
* commit 'c612a133dcc3ffaa1a2172d2cac20bddbd5df284':
  Update capability.h
2013-09-25 16:33:24 -07:00
Michael Wright
c612a133dc Merge "Update capability.h" 2013-09-25 23:29:32 +00:00
Michael Wright
8bd5aa6a76 Update capability.h
To upstream SHA 6e4664525b1db28f8c4e1130957f70a94c19213e (v3.11)

Change-Id: Ic0d95464bc9001246df898489b2ea603a97ca231
2013-09-25 14:55:55 -07:00
Elliott Hughes
7248a2d4d0 Add a unit test for %n.
Change-Id: I9335e089d66c98d34577f5e1d1a54b8f507b94f6
2013-09-24 18:01:33 -07:00
Nick Kralevich
60f4f9a5b9 libc: fortify recvfrom()
Fortify calls to recv() and recvfrom().

We use __bos0 to match glibc's behavior, and because I haven't
tested using __bos.

Change-Id: Iad6ae96551a89af17a9c347b80cdefcf2020c505
2013-09-24 16:45:01 -07:00
Elliott Hughes
67e34826d8 am 3c49c6ec: am 759111ca: Merge "Simplify the SYSCALLS.TXT format."
* commit '3c49c6ec49e0a4170ff7c9c74ac2e76b9b846ced':
  Simplify the SYSCALLS.TXT format.
2013-09-24 11:29:29 -07:00
Elliott Hughes
3c49c6ec49 am 759111ca: Merge "Simplify the SYSCALLS.TXT format."
* commit '759111cadf84f337f98177259d9e3f9d39c9eea9':
  Simplify the SYSCALLS.TXT format.
2013-09-24 11:27:42 -07:00
Elliott Hughes
759111cadf Merge "Simplify the SYSCALLS.TXT format." 2013-09-24 18:25:50 +00:00
Elliott Hughes
2f81ac8443 am 4808f052: am c8d98679: Merge "Update taskstats.h from Linux 3.11.1"
* commit '4808f05238d66ba474c6d33da066da799d4e6cf3':
  Update taskstats.h from Linux 3.11.1
2013-09-24 07:37:48 -07:00
Elliott Hughes
4808f05238 am c8d98679: Merge "Update taskstats.h from Linux 3.11.1"
* commit 'c8d98679faa9b7f824e09d969cc1a469c721f4d8':
  Update taskstats.h from Linux 3.11.1
2013-09-24 07:36:12 -07:00
Elliott Hughes
c8d98679fa Merge "Update taskstats.h from Linux 3.11.1" 2013-09-24 14:29:29 +00:00
Elliott Hughes
5e52279256 Simplify the SYSCALLS.TXT format.
This will make addition of new architectures less unpleasant.

Change-Id: I77c866a63b686e8e70709d08fcf52e8a2d37310a
2013-09-24 00:35:31 -07:00
Elliott Hughes
a663ebd468 am f8222078: am 43e5badd: Merge "Fix %hhd formats in the printf family."
* commit 'f82220785d20385fa02aa78b02f3fdb98e5aa553':
  Fix %hhd formats in the printf family.
2013-09-23 16:39:13 -07:00
Elliott Hughes
f82220785d am 43e5badd: Merge "Fix %hhd formats in the printf family."
* commit '43e5baddbcaf571c1a74149c53d1e70a5a2c9de3':
  Fix %hhd formats in the printf family.
2013-09-23 16:36:19 -07:00
Elliott Hughes
43e5baddbc Merge "Fix %hhd formats in the printf family." 2013-09-23 23:34:00 +00:00
Elliott Hughes
1d13c64d78 Fix %hhd formats in the printf family.
Found by adapting the simple unit tests for libc logging to test
snprintf too. Fix taken from upstream OpenBSD without updating
the rest of stdio.

Change-Id: Ie339a8e9393a36080147aae4d6665118e5d93647
2013-09-23 16:02:39 -07:00
Christopher Ferris
34c2a9fc37 Move stack unwinding test into library.
Bug: 8291716

(cherry picked from commit 8240bed918)

Change-Id: I1da2d0757ed304c352229f9818c052925d4e976a
2013-09-23 12:16:19 -07:00
Christopher Ferris
f4af911065 Create bionic unit test library for use with CTS.
Bug: 8291716

(cherry picked from commit 153d92765b)

Change-Id: Ia53b85b95621b7000034e4c6259d6586d0987dee
2013-09-23 12:16:01 -07:00