Commit Graph

28140 Commits

Author SHA1 Message Date
David 'Digit' Turner 833ea8d502 Fix an infinite loop in time2sub.
The problem is that time_t is signed, and the original code relied on the
fact that (X + c < X) in case of overflow for c >= 0. Unfortunately, this
condition is only guaranteed by the standard for unsigned arithmetic, and
the gcc 4.4.0 optimizer did completely remove the corresponding test from
the code. This resulted in a missing boundary check, and an infinite loop.

The problem is solved by testing explicitely for TIME_T_MIN and TIME_T_MAX
in the loop that uses this.

Also fix increment_overflow and long_increment_overflow which were buggy
for exactly the same reasons.

Also remove some compiler warnings.

Note: a similar fix was performed in bionic/libc
2009-09-09 18:32:07 -07:00
David 'Digit' Turner ec539ead01 am 3ebc52eb: am 2f21659d: Merge change 24213 into eclair
Merge commit '3ebc52eb710c75a1ef51dca7c767701bab74a9ee'

* commit '3ebc52eb710c75a1ef51dca7c767701bab74a9ee':
  Fix a bug that prevented the "generic" product builds from working in the emulator.
2009-09-09 18:11:00 -07:00
David 'Digit' Turner 3ebc52eb71 am 2f21659d: Merge change 24213 into eclair
Merge commit '2f21659d4565afd65da1be07c28317a3cb4287a1' into eclair-plus-aosp

* commit '2f21659d4565afd65da1be07c28317a3cb4287a1':
  Fix a bug that prevented the "generic" product builds from working in the emulator.
2009-09-09 18:05:38 -07:00
Android (Google) Code Review 2f21659d45 Merge change 24213 into eclair
* changes:
  Fix a bug that prevented the "generic" product builds from working in the emulator.
2009-09-09 21:02:10 -04:00
Jack Palevich a39751754d am 24e78ecf: am 0e1f612d: Merge change 24415 into eclair
Merge commit '24e78ecfb93bceea39c2d58af5eae2aa6467d395'

* commit '24e78ecfb93bceea39c2d58af5eae2aa6467d395':
  Move ARM disassembler out of libacc and into the acc command-line tool.
2009-09-09 16:29:37 -07:00
Elliott Hughes 1e5d3b6508 am 983b8bb0: am d9a16d6e: Merge change 23852 into eclair
Merge commit '983b8bb01c3abc8e338f7779ee62fd6aab2f56a0'

* commit '983b8bb01c3abc8e338f7779ee62fd6aab2f56a0':
  Fix a call to memset(3) with reversed arguments.
2009-09-09 16:27:33 -07:00
Bob Lee 2e755e96ab am b97d616d: am d62ae8f1: Merge change 24061 into eclair
Merge commit 'b97d616d028f801b6e914c9a29d9177de2177020'

* commit 'b97d616d028f801b6e914c9a29d9177de2177020':
  Added a hack that makes the SD card world-writable when the sampling
2009-09-09 13:42:22 -07:00
Mike Lockwood 3ae1aa06e7 am aae43f9e: am 9332482e: init.rc: Make /data/dontpanic files readable only by the system process.
Merge commit 'aae43f9e7582a403b8c4f20d59e26c36bbde5219'

* commit 'aae43f9e7582a403b8c4f20d59e26c36bbde5219':
  init.rc: Make /data/dontpanic files readable only by the system process.
2009-09-09 13:40:43 -07:00
Jack Palevich 24e78ecfb9 am 0e1f612d: Merge change 24415 into eclair
Merge commit '0e1f612d5d5caca3f8c8d7f1689a96148a24afd2' into eclair-plus-aosp

* commit '0e1f612d5d5caca3f8c8d7f1689a96148a24afd2':
  Move ARM disassembler out of libacc and into the acc command-line tool.
2009-09-09 13:37:56 -07:00
Android (Google) Code Review 0e1f612d5d Merge change 24415 into eclair
* changes:
  Move ARM disassembler out of libacc and into the acc command-line tool.
2009-09-09 16:32:58 -04:00
Jack Palevich d5315573d7 Move ARM disassembler out of libacc and into the acc command-line tool. 2009-09-09 13:19:34 -07:00
Vinay HARUGOP 02608475ed ARM architecture reference manuals for ARMv6 & ARMv7 state that the use of 'swp' instruction is deprecated
ARMv6 onwards. These architectures provide the load-linked, store-conditional pair of ldrex/strex whose use
is recommended in place of 'swp'. Also, the description of the 'swp' instruction in the ARMv6 reference
manual states that the swap operation does not include any memory barrier guarantees.This fix attempts to
address these issues by providing an atomic swap implementation using ldrex/strex under _ARM_HAVE_LDREX_STREX
macro. _ARM_HAVE_LDREX_STREX macro is defined in  cpu-features.h file and patch is submitted under change ID 11088.
This Fix is verified on ST Ericsson's U8500 platform and Submitted on behalf of a third-party:
Surinder-pal SINGH from STMicroelectronics.
2009-09-10 00:34:35 +05:30
Elliott Hughes 983b8bb01c am d9a16d6e: Merge change 23852 into eclair
Merge commit 'd9a16d6e7daf8e58ebc7760530d9b015dbe4678d' into eclair-plus-aosp

* commit 'd9a16d6e7daf8e58ebc7760530d9b015dbe4678d':
  Fix a call to memset(3) with reversed arguments.
2009-09-09 10:49:30 -07:00
Android (Google) Code Review d9a16d6e7d Merge change 23852 into eclair
* changes:
  Fix a call to memset(3) with reversed arguments.
2009-09-09 13:43:40 -04:00
Bob Lee b97d616d02 am d62ae8f1: Merge change 24061 into eclair
Merge commit 'd62ae8f12f7b6b7fa13366a064ad4d483a3312e5' into eclair-plus-aosp

* commit 'd62ae8f12f7b6b7fa13366a064ad4d483a3312e5':
  Added a hack that makes the SD card world-writable when the sampling
2009-09-09 02:12:58 -07:00
Android (Google) Code Review d62ae8f12f Merge change 24061 into eclair
* changes:
  Added a hack that makes the SD card world-writable when the sampling profiler is turned out. I'll remove this once egnor has the drop box in system_server working.
2009-09-09 02:10:07 -07:00
Mike Lockwood aae43f9e75 am 9332482e: init.rc: Make /data/dontpanic files readable only by the system process.
Merge commit '9332482ed2945174d94615f0720f88702cb92667' into eclair-plus-aosp

* commit '9332482ed2945174d94615f0720f88702cb92667':
  init.rc: Make /data/dontpanic files readable only by the system process.
2009-09-08 20:21:04 -07:00
Mike Lockwood 9332482ed2 init.rc: Make /data/dontpanic files readable only by the system process.
Change-Id: If87470b7bcbb1c0774d10296ac82605db3dd9bf0
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-09-08 22:55:59 -04:00
David 'Digit' Turner ca8177d814 Fix a bug that prevented the "generic" product builds from working in the emulator.
This also ensures that emulator-specific files /init.goldfish.rc and
/system/etc/init.goldfish.sh are never part of -user builds, which
correspond to production devices.
2009-09-08 16:03:49 -07:00
Jack Palevich 18fbabc2b0 am ef41d238: am c0b74902: Merge change 24171 into eclair
Merge commit 'ef41d2381ddf5cf6a1ad2cfd531cac8b943d20fc'

* commit 'ef41d2381ddf5cf6a1ad2cfd531cac8b943d20fc':
  Turn an assert into an error to handle bad struct members more gracefully.
2009-09-08 13:43:13 -07:00
Jack Palevich f937d759c7 am 82145320: am 6b89efab: Merge change 24168 into eclair
Merge commit '8214532088d90dcd2451a0f18a856182fdd85d39'

* commit '8214532088d90dcd2451a0f18a856182fdd85d39':
  Improved DEBUG_SAVE_INPUT_TO_FILE logic.
2009-09-08 13:43:11 -07:00
Jack Palevich 57580063cb am 45a35237: am 5f324384: Merge change 24167 into eclair
Merge commit '45a35237f34c92f8e51eb42eb01e3a054d20aa23'

* commit '45a35237f34c92f8e51eb42eb01e3a054d20aa23':
  Generate an error for the use of an undeclared struct.
2009-09-08 13:43:09 -07:00
Jack Palevich ef41d2381d am c0b74902: Merge change 24171 into eclair
Merge commit 'c0b74902b85c538c9dac549aa5b213a3fb3edc57' into eclair-plus-aosp

* commit 'c0b74902b85c538c9dac549aa5b213a3fb3edc57':
  Turn an assert into an error to handle bad struct members more gracefully.
2009-09-08 13:37:45 -07:00
Jack Palevich 8214532088 am 6b89efab: Merge change 24168 into eclair
Merge commit '6b89efab5ac6b1d5d59891ee4746347957de5c05' into eclair-plus-aosp

* commit '6b89efab5ac6b1d5d59891ee4746347957de5c05':
  Improved DEBUG_SAVE_INPUT_TO_FILE logic.
2009-09-08 13:37:43 -07:00
Jack Palevich 45a35237f3 am 5f324384: Merge change 24167 into eclair
Merge commit '5f324384027f1d753eeaada3e05ece236a095384' into eclair-plus-aosp

* commit '5f324384027f1d753eeaada3e05ece236a095384':
  Generate an error for the use of an undeclared struct.
2009-09-08 13:37:42 -07:00
Android (Google) Code Review c0b74902b8 Merge change 24171 into eclair
* changes:
  Turn an assert into an error to handle bad struct members more gracefully.
2009-09-08 12:08:24 -07:00
Jack Palevich c408bbf4a7 Turn an assert into an error to handle bad struct members more gracefully. 2009-09-08 12:07:32 -07:00
Android (Google) Code Review 6b89efab5a Merge change 24168 into eclair
* changes:
  Improved DEBUG_SAVE_INPUT_TO_FILE logic.
2009-09-08 11:54:49 -07:00
Android (Google) Code Review 5f32438402 Merge change 24167 into eclair
* changes:
  Generate an error for the use of an undeclared struct.
2009-09-08 11:54:31 -07:00
Jack Palevich 9116bc4c18 Improved DEBUG_SAVE_INPUT_TO_FILE logic. 2009-09-08 11:46:42 -07:00
Jack Palevich 61de31feff Generate an error for the use of an undeclared struct. 2009-09-08 11:06:40 -07:00
San Mehat f8b6f78979 am f914c821: am 82a6014d: rootdir: init.rc: Allow all processes access to /data/dontpanic
Merge commit 'f914c821e15c815cca65fd837d9ee45170bced3d'

* commit 'f914c821e15c815cca65fd837d9ee45170bced3d':
  rootdir: init.rc: Allow all processes access to /data/dontpanic
2009-09-05 15:14:04 -07:00
San Mehat f914c821e1 am 82a6014d: rootdir: init.rc: Allow all processes access to /data/dontpanic
Merge commit '82a6014d90c94a2032e014901917e1d503475d5e' into eclair-plus-aosp

* commit '82a6014d90c94a2032e014901917e1d503475d5e':
  rootdir: init.rc: Allow all processes access to /data/dontpanic
2009-09-05 15:11:50 -07:00
San Mehat 82a6014d90 rootdir: init.rc: Allow all processes access to /data/dontpanic
***STOPSHIP***

Signed-off-by: San Mehat <san@google.com>
2009-09-05 15:01:52 -07:00
Bob Lee bdb005acbc Added a hack that makes the SD card world-writable when the sampling
profiler is turned out. I'll remove this once egnor has the drop
box in system_server working.
2009-09-05 11:43:06 -07:00
Mathias Agopian 9b243e152b am bb59b7a5: am 4599c1ff: Merge change 23892 into eclair
Merge commit 'bb59b7a5c9444c4fccae10d5a4b00165d47007eb'

* commit 'bb59b7a5c9444c4fccae10d5a4b00165d47007eb':
  android_atomic_write() implementation was using cmpxchg which was useless
2009-09-04 16:35:08 -07:00
Mathias Agopian bb59b7a5c9 am 4599c1ff: Merge change 23892 into eclair
Merge commit '4599c1ff56b1962eecfe647da26e922c0fe2fa13' into eclair-plus-aosp

* commit '4599c1ff56b1962eecfe647da26e922c0fe2fa13':
  android_atomic_write() implementation was using cmpxchg which was useless
2009-09-04 16:34:28 -07:00
Android (Google) Code Review 4599c1ff56 Merge change 23892 into eclair
* changes:
  android_atomic_write() implementation was using cmpxchg which was useless
2009-09-04 16:32:47 -07:00
Jack Palevich 8342e885e1 am 0a33f2df: am dfd31ee8: Merge change 24034 into eclair
Merge commit '0a33f2df9b4accc9856003f23acaf927ec57da9b'

* commit '0a33f2df9b4accc9856003f23acaf927ec57da9b':
  Improve error message for unknown struct members
2009-09-04 15:39:33 -07:00
Jack Palevich 0a33f2df9b am dfd31ee8: Merge change 24034 into eclair
Merge commit 'dfd31ee89975a3307c088f7a69a63b93381e2758' into eclair-plus-aosp

* commit 'dfd31ee89975a3307c088f7a69a63b93381e2758':
  Improve error message for unknown struct members
2009-09-04 15:37:56 -07:00
Android (Google) Code Review dfd31ee899 Merge change 24034 into eclair
* changes:
  Improve error message for unknown struct members
2009-09-04 15:35:58 -07:00
Jack Palevich 8fe5dcac34 Improve error message for unknown struct members
We now customize the error message to correctly refer to the '.' or
'->' operator , whichever one is actually being used when the error
occurs.
2009-09-04 15:34:21 -07:00
Jack Palevich a0a42dff0a am 08f2c140: am 9b7ed8a3: Merge change 24030 into eclair
Merge commit '08f2c1404ffa0bb4604960e71de20bc8b2a56a54'

* commit '08f2c1404ffa0bb4604960e71de20bc8b2a56a54':
  Improve address operator (unary &).
2009-09-04 15:27:52 -07:00
Jack Palevich 08f2c1404f am 9b7ed8a3: Merge change 24030 into eclair
Merge commit '9b7ed8a377b2e0abfb0d802fc1211ace194d33ad' into eclair-plus-aosp

* commit '9b7ed8a377b2e0abfb0d802fc1211ace194d33ad':
  Improve address operator (unary &).
2009-09-04 15:26:16 -07:00
Android (Google) Code Review 9b7ed8a377 Merge change 24030 into eclair
* changes:
  Improve address operator (unary &).
2009-09-04 15:25:09 -07:00
Jack Palevich 5fd66ae01e Improve address operator (unary &).
Until now the address operator only worked with simple variables.
Now it works with arbitrary expressions (that are lvalues or function
names). So for example this now works:

struct S { int a[10]};

int f(struct S* p) {
    return &p->a[3];
}
2009-09-04 15:24:23 -07:00
Ken Shirriff ae126e91dd am 4b81ad12: am c62592bb: Merge change 23911 into eclair
Merge commit '4b81ad1287c5aaea9a2961247db3b977226670b9'

* commit '4b81ad1287c5aaea9a2961247db3b977226670b9':
  Add contacts aggregation event to the log.
2009-09-04 14:05:10 -07:00
Ken Shirriff 4b81ad1287 am c62592bb: Merge change 23911 into eclair
Merge commit 'c62592bb46dc0dc112fb5211d97799ffd3e2dcde' into eclair-plus-aosp

* commit 'c62592bb46dc0dc112fb5211d97799ffd3e2dcde':
  Add contacts aggregation event to the log.
2009-09-04 14:03:14 -07:00
Android (Google) Code Review c62592bb46 Merge change 23911 into eclair
* changes:
  Add contacts aggregation event to the log.
2009-09-04 14:02:19 -07:00
Jean-Baptiste Queru 892ea34183 am c31ebf5f: merge from open-source master
Merge commit 'c31ebf5ff3cbeb992e0cbe61205f424040f1028b'

* commit 'c31ebf5ff3cbeb992e0cbe61205f424040f1028b':
2009-09-04 11:05:39 -07:00