Thread suspension: Mac: Fix register reading when %eip coincides with TCB range
Thread suspension: Mac: Fix register reading when %eip coincides with TCB range

NaClAppThreadGetSuspendedRegisters() could return the wrong values for
%eip and %ecx if the thread was suspended or faulted in untrusted code
when %eip happened to be within the numeric range of the small
trusted-code routine NaClSwitchRemainingRegsViaECX().

We fix this by adding a check for the %cs value.

This fixes a failure that started occurring on the bots when the
trusted and untrusted binaries started having coinciding addresses.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3180
TEST=run_faulted_thread_queue_test (but didn't reproduce failure)

Review URL: https://codereview.chromium.org/11316253

git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@10355 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

sbc100/native_client,nacl-webkit/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,nacl-webkit/native_client,nacl-webkit/native_client,sbc100/native_client,nacl-webkit/native_client,sbc100/native_client,nacl-webkit/native_client