| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 /* | 7 /* |
| 8 * NaCl Simple/secure ELF loader (NaCl SEL). | 8 * NaCl Simple/secure ELF loader (NaCl SEL). |
| 9 */ | 9 */ |
| 10 #include "native_client/src/include/portability.h" | 10 #include "native_client/src/include/portability.h" |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 if (LOAD_OK != pq_error) { | 537 if (LOAD_OK != pq_error) { |
| 538 errcode = pq_error; | 538 errcode = pq_error; |
| 539 nap->module_load_status = pq_error; | 539 nap->module_load_status = pq_error; |
| 540 fprintf(stderr, "Error while loading \"%s\": %s\n", | 540 fprintf(stderr, "Error while loading \"%s\": %s\n", |
| 541 NULL != nacl_file ? nacl_file | 541 NULL != nacl_file ? nacl_file |
| 542 : "(no file, to-be-supplied-via-RPC)", | 542 : "(no file, to-be-supplied-via-RPC)", |
| 543 NaClErrorString(errcode)); | 543 NaClErrorString(errcode)); |
| 544 } | 544 } |
| 545 } | 545 } |
| 546 | 546 |
| 547 nap->enable_dfa_validator = 0; | |
| 548 if (getenv("NACL_DANGEROUS_USE_DFA_VALIDATOR") != NULL) { | |
| 549 fprintf(stderr, "DANGER! USING THE UNSTABLE DFA VALIDATOR!\n"); | |
| 550 nap->enable_dfa_validator = 1; | |
| 551 } | |
| 552 | |
| 553 /* Sanity check. */ | 547 /* Sanity check. */ |
| 554 NaClSignalAssertNoHandlers(); | 548 NaClSignalAssertNoHandlers(); |
| 555 | 549 |
| 556 if (handle_signals) { | 550 if (handle_signals) { |
| 557 NaClSignalHandlerInit(); | 551 NaClSignalHandlerInit(); |
| 558 } else { | 552 } else { |
| 559 /* | 553 /* |
| 560 * Patch the Windows exception dispatcher to be safe in the case | 554 * Patch the Windows exception dispatcher to be safe in the case |
| 561 * of faults inside x86-64 sandboxed code. The sandbox is not | 555 * of faults inside x86-64 sandboxed code. The sandbox is not |
| 562 * secure on 64-bit Windows without this. | 556 * secure on 64-bit Windows without this. |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 912 fflush(stdout); | 906 fflush(stdout); |
| 913 | 907 |
| 914 if (handle_signals) NaClSignalHandlerFini(); | 908 if (handle_signals) NaClSignalHandlerFini(); |
| 915 NaClAllModulesFini(); | 909 NaClAllModulesFini(); |
| 916 | 910 |
| 917 NaClExit(ret_code); | 911 NaClExit(ret_code); |
| 918 | 912 |
| 919 /* Unreachable, but having the return prevents a compiler error. */ | 913 /* Unreachable, but having the return prevents a compiler error. */ |
| 920 return ret_code; | 914 return ret_code; |
| 921 } | 915 } |
| OLD | NEW |