Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Issue 1940883002: Work around a kernel bug on Android. (Closed)

Created:
4 years, 7 months ago by Vyacheslav Egorov (Google)
Modified:
4 years, 7 months ago
Reviewers:
zra, Florian Schneider
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Work around a kernel bug on Android. Kernel does not clear If-Then execution state bits when entering ARM signal handler which violates requirements imposed by ARM architecture reference. Some CPUs look at these bits even while in ARM mode which causes them to skip some instructions in the prologue of the signal handler. To work around the issue we insert enough NOPs in the prologue to ensure that no actual instructions are skipped and then branch to the actual signal handler. For the kernel patch that fixes the issue see: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6ecf830e5029598732e04067e325d946097519cb This causes sporadic crashes with SIGILL on some testing devices (e.g. Nexus 7). R=fschneider@google.com BUG= Committed: https://github.com/dart-lang/sdk/commit/b089d4f0040cb02596c33ffecbee2c7dc95bc108

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -9 lines) Patch
M runtime/vm/signal_handler.h View 1 2 chunks +62 lines, -1 line 2 comments Download
M runtime/vm/signal_handler_android.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/signal_handler_linux.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/signal_handler_macos.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/signal_handler_win.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/thread_interrupter_android.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/thread_interrupter_linux.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/thread_interrupter_macos.cc View 1 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 8 (2 generated)
Vyacheslav Egorov (Google)
4 years, 7 months ago (2016-05-02 13:28:08 UTC) #1
Florian Schneider
https://codereview.chromium.org/1940883002/diff/1/runtime/vm/thread_interrupter_android.cc File runtime/vm/thread_interrupter_android.cc (right): https://codereview.chromium.org/1940883002/diff/1/runtime/vm/thread_interrupter_android.cc#newcode71 runtime/vm/thread_interrupter_android.cc:71: asm volatile("bx %3" Need this only on ARM, not ...
4 years, 7 months ago (2016-05-02 13:44:45 UTC) #2
Vyacheslav Egorov (Google)
PTAL
4 years, 7 months ago (2016-05-02 14:05:41 UTC) #3
Florian Schneider
Lgtm. https://codereview.chromium.org/1940883002/diff/20001/runtime/vm/signal_handler.h File runtime/vm/signal_handler.h (right): https://codereview.chromium.org/1940883002/diff/20001/runtime/vm/signal_handler.h#newcode43 runtime/vm/signal_handler.h:43: #if defined(HOST_ARCH_ARM) && \ s/HOST_ARCH_ARM/TARGET_ARCH_ARM/
4 years, 7 months ago (2016-05-02 14:43:43 UTC) #4
zra
DBC As an alternative to this fix, would it also work to compile the VM ...
4 years, 7 months ago (2016-05-02 15:53:54 UTC) #6
Vyacheslav Egorov (Google)
4 years, 7 months ago (2016-05-02 17:12:52 UTC) #8
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
b089d4f0040cb02596c33ffecbee2c7dc95bc108 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698