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

Issue 9316125: Adding untrusted crash dump / stack trace tests. (Closed)

Created:
8 years, 10 months ago by bradn
Modified:
8 years, 10 months ago
CC:
native-client-reviews_googlegroups.com
Visibility:
Public.

Description

Adding untrusted crash dump / stack trace tests. This demonstrates using hardware exception handling support to produce stack traces in crashed modules. Not yet handled: - 64-bit - registers - upload of dumps - call frame variable/parameter decoding BUG=http://code.google.com/p/nativeclient/issues/detail?id=2595 TEST=untrusted_crash_dump_test,inbrowser_untrusted_crash_dump_test R=mseaborn@chromium.org,ncbray@chromium.org Committed: https://src.chromium.org/viewvc/native_client?view=rev&revision=7825

Patch Set 1 #

Patch Set 2 : dropping extra change #

Patch Set 3 : fixing linux warning #

Patch Set 4 : fixing 64-bit build issue #

Total comments: 54

Patch Set 5 : Switching to environment variable for separate sel_ldr #

Patch Set 6 : fixing bad dep for newlib #

Patch Set 7 : Fixing review comments 2 #

Total comments: 9

Patch Set 8 : Turning on for linux32 #

Total comments: 2

Patch Set 9 : Switching testing and using ebp #

Patch Set 10 : taking out of irt tests #

Total comments: 54

Patch Set 11 : lineno -> line contents #

Patch Set 12 : code review comments 3 #

Total comments: 58

Patch Set 13 : #

Patch Set 14 : Fixing - thing. #

Total comments: 4

Patch Set 15 : Words words words #

Patch Set 16 : staging -> lib #

Patch Set 17 : don't build on pnacl #

Patch Set 18 : add json escaping to fix windows #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+771 lines, -9 lines) Patch
M SConstruct View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +15 lines, -8 lines 0 comments Download
M site_scons/site_tools/naclsdk.py View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M src/trusted/service_runtime/sel_main.c View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
A src/untrusted/crash_dump/decode_dump.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +197 lines, -0 lines 0 comments Download
A src/untrusted/crash_dump/nacl.scons View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +13 lines, -0 lines 0 comments Download
A src/untrusted/crash_dump/untrusted_crash_dump.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +24 lines, -0 lines 0 comments Download
A src/untrusted/crash_dump/untrusted_crash_dump.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +228 lines, -0 lines 4 comments Download
A tests/untrusted_crash_dump/nacl.scons View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +92 lines, -0 lines 0 comments Download
A tests/untrusted_crash_dump/untrusted_crash_dump.html View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +65 lines, -0 lines 0 comments Download
A tests/untrusted_crash_dump/untrusted_crash_dump_lib.c View 1 chunk +9 lines, -0 lines 0 comments Download
A tests/untrusted_crash_dump/untrusted_crash_dump_test.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +50 lines, -0 lines 0 comments Download
A tests/untrusted_crash_dump/untrusted_crash_dump_test.nmf View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -0 lines 0 comments Download
A tests/untrusted_crash_dump/untrusted_crash_dump_test.py View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +59 lines, -0 lines 0 comments Download
M tools/code_hygiene.py View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +8 lines, -1 line 0 comments Download

Messages

Total messages: 17 (0 generated)
bradn
8 years, 10 months ago (2012-02-06 05:53:55 UTC) #1
Mark Seaborn
I've just looked at the TCB change so far... http://codereview.chromium.org/9316125/diff/3010/src/trusted/service_runtime/build.scons File src/trusted/service_runtime/build.scons (right): http://codereview.chromium.org/9316125/diff/3010/src/trusted/service_runtime/build.scons#newcode326 src/trusted/service_runtime/build.scons:326: ...
8 years, 10 months ago (2012-02-06 17:35:04 UTC) #2
bradn
PTAL http://codereview.chromium.org/9316125/diff/3010/src/trusted/service_runtime/build.scons File src/trusted/service_runtime/build.scons (right): http://codereview.chromium.org/9316125/diff/3010/src/trusted/service_runtime/build.scons#newcode326 src/trusted/service_runtime/build.scons:326: env_exc.ComponentObject('sel_main_exc', 'sel_main.c')] + r_debug_objs On 2012/02/06 17:35:04, Mark ...
8 years, 10 months ago (2012-02-06 19:26:59 UTC) #3
Mark Seaborn
http://codereview.chromium.org/9316125/diff/3010/SConstruct File SConstruct (right): http://codereview.chromium.org/9316125/diff/3010/SConstruct#newcode1489 SConstruct:1489: cmd = ('${PYTHON} ' + Use AutoDepsCommand() instead of ...
8 years, 10 months ago (2012-02-06 19:44:06 UTC) #4
bradn
PTAL http://codereview.chromium.org/9316125/diff/3010/SConstruct File SConstruct (right): http://codereview.chromium.org/9316125/diff/3010/SConstruct#newcode1489 SConstruct:1489: cmd = ('${PYTHON} ' + On 2012/02/06 19:44:06, ...
8 years, 10 months ago (2012-02-06 22:27:48 UTC) #5
Mark Seaborn
http://codereview.chromium.org/9316125/diff/15001/tests/inbrowser_untrusted_crash_dump_test/nacl.scons File tests/inbrowser_untrusted_crash_dump_test/nacl.scons (right): http://codereview.chromium.org/9316125/diff/15001/tests/inbrowser_untrusted_crash_dump_test/nacl.scons#newcode1 tests/inbrowser_untrusted_crash_dump_test/nacl.scons:1: # -*- python -*- The in-browser version isn't going ...
8 years, 10 months ago (2012-02-09 22:24:55 UTC) #6
bradn
PTAL http://codereview.chromium.org/9316125/diff/15001/tests/inbrowser_untrusted_crash_dump_test/nacl.scons File tests/inbrowser_untrusted_crash_dump_test/nacl.scons (right): http://codereview.chromium.org/9316125/diff/15001/tests/inbrowser_untrusted_crash_dump_test/nacl.scons#newcode1 tests/inbrowser_untrusted_crash_dump_test/nacl.scons:1: # -*- python -*- On 2012/02/09 22:24:55, Mark ...
8 years, 10 months ago (2012-02-11 01:04:14 UTC) #7
bradn
Uploaded new version with lineno -> line contents via linecache (sorry forgot that bit in ...
8 years, 10 months ago (2012-02-13 18:55:45 UTC) #8
Mark Seaborn
Can you create an issue to track this feature, please? http://codereview.chromium.org/9316125/diff/30019/SConstruct File SConstruct (right): http://codereview.chromium.org/9316125/diff/30019/SConstruct#newcode3286 ...
8 years, 10 months ago (2012-02-13 19:04:08 UTC) #9
bradn
Added issue for this. PTAL http://codereview.chromium.org/9316125/diff/30019/SConstruct File SConstruct (right): http://codereview.chromium.org/9316125/diff/30019/SConstruct#newcode3286 SConstruct:3286: 'tests/untrusted_crash_dump/nacl.scons', On 2012/02/13 19:04:08, ...
8 years, 10 months ago (2012-02-13 23:42:03 UTC) #10
Mark Seaborn
I would OK this, but the current version seems to have some trybot failures, so ...
8 years, 10 months ago (2012-02-16 18:42:50 UTC) #11
bradn
PTAL https://chromiumcodereview.appspot.com/9316125/diff/40003/src/untrusted/crash_dump/decode_dump.py File src/untrusted/crash_dump/decode_dump.py (right): https://chromiumcodereview.appspot.com/9316125/diff/40003/src/untrusted/crash_dump/decode_dump.py#newcode32 src/untrusted/crash_dump/decode_dump.py:32: if options.main_nexe and filename in ['NaClMain', '(null)']: On ...
8 years, 10 months ago (2012-02-16 20:13:09 UTC) #12
Mark Seaborn
LGTM, though you still have some trybot failures: scons-out/nacl_irt_test-x86-32-glibc/obj/tests/untrusted_crash_dump/inbrowser_untrusted_crash_dump_test.nexe failed: Explicit dependency `scons-out/nacl_irt_test-x86-32-glibc/staging/libuntrusted_crash_dump_lib.so' not found, ...
8 years, 10 months ago (2012-02-17 01:13:40 UTC) #13
bradn
http://codereview.chromium.org/9316125/diff/47008/tests/untrusted_crash_dump/untrusted_crash_dump_test.c File tests/untrusted_crash_dump/untrusted_crash_dump_test.c (right): http://codereview.chromium.org/9316125/diff/47008/tests/untrusted_crash_dump/untrusted_crash_dump_test.c#newcode18 tests/untrusted_crash_dump/untrusted_crash_dump_test.c:18: * Calling thru several layers of functions, varying arguments ...
8 years, 10 months ago (2012-02-17 01:28:01 UTC) #14
bradn
Had to add json escaping after all to fix windows. PTAL
8 years, 10 months ago (2012-02-17 06:20:43 UTC) #15
Mark Seaborn
LGTM to changes, with a nit http://codereview.chromium.org/9316125/diff/52045/src/untrusted/crash_dump/untrusted_crash_dump.c File src/untrusted/crash_dump/untrusted_crash_dump.c (right): http://codereview.chromium.org/9316125/diff/52045/src/untrusted/crash_dump/untrusted_crash_dump.c#newcode42 src/untrusted/crash_dump/untrusted_crash_dump.c:42: static void JsonEscape(const ...
8 years, 10 months ago (2012-02-17 17:37:28 UTC) #16
bradn
8 years, 10 months ago (2012-02-17 18:02:34 UTC) #17
http://codereview.chromium.org/9316125/diff/52045/src/untrusted/crash_dump/un...
File src/untrusted/crash_dump/untrusted_crash_dump.c (right):

http://codereview.chromium.org/9316125/diff/52045/src/untrusted/crash_dump/un...
src/untrusted/crash_dump/untrusted_crash_dump.c:42: static void JsonEscape(const
char *str, FILE *file) {
On 2012/02/17 17:37:28, Mark Seaborn wrote:
> WriteJsonString() would be a little more descriptive

K, will fix in follow on CL.

http://codereview.chromium.org/9316125/diff/52045/src/untrusted/crash_dump/un...
src/untrusted/crash_dump/untrusted_crash_dump.c:45: while ((ch = *str++)) {
On 2012/02/17 17:37:28, Mark Seaborn wrote:
> I'd prefer to avoid assignments inside conditions, even with the double
> brackets.
> 
> Maybe:
> for (;;) {
>   char ch = *str++;
>   if (ch == 0) {
>     break;
>   } else if (ch == '"')
>   ...
> }

HAH, that's what I had and then changed it before upload as you've reacted badly
in the past to for(;;) and breaks :-)
New CL coming shortly.

Powered by Google App Engine
This is Rietveld 408576698