| 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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 if (LOAD_OK != pq_error) { | 498 if (LOAD_OK != pq_error) { |
| 499 errcode = pq_error; | 499 errcode = pq_error; |
| 500 nap->module_load_status = pq_error; | 500 nap->module_load_status = pq_error; |
| 501 fprintf(stderr, "Error while loading \"%s\": %s\n", | 501 fprintf(stderr, "Error while loading \"%s\": %s\n", |
| 502 NULL != nacl_file ? nacl_file | 502 NULL != nacl_file ? nacl_file |
| 503 : "(no file, to-be-supplied-via-RPC)", | 503 : "(no file, to-be-supplied-via-RPC)", |
| 504 NaClErrorString(errcode)); | 504 NaClErrorString(errcode)); |
| 505 } | 505 } |
| 506 } | 506 } |
| 507 | 507 |
| 508 nap->enable_dfa_validator = 0; | |
| 509 if (getenv("NACL_DANGEROUS_USE_DFA_VALIDATOR") != NULL) { | |
| 510 fprintf(stderr, "DANGER! USING THE UNSTABLE DFA VALIDATOR!\n"); | |
| 511 nap->enable_dfa_validator = 1; | |
| 512 } | |
| 513 | |
| 514 /* Sanity check. */ | 508 /* Sanity check. */ |
| 515 NaClSignalAssertNoHandlers(); | 509 NaClSignalAssertNoHandlers(); |
| 516 | 510 |
| 517 if (handle_signals) { | 511 if (handle_signals) { |
| 518 NaClSignalHandlerInit(); | 512 NaClSignalHandlerInit(); |
| 519 } else { | 513 } else { |
| 520 /* | 514 /* |
| 521 * Patch the Windows exception dispatcher to be safe in the case | 515 * Patch the Windows exception dispatcher to be safe in the case |
| 522 * of faults inside x86-64 sandboxed code. The sandbox is not | 516 * of faults inside x86-64 sandboxed code. The sandbox is not |
| 523 * secure on 64-bit Windows without this. | 517 * secure on 64-bit Windows without this. |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 fflush(stdout); | 866 fflush(stdout); |
| 873 | 867 |
| 874 if (handle_signals) NaClSignalHandlerFini(); | 868 if (handle_signals) NaClSignalHandlerFini(); |
| 875 NaClAllModulesFini(); | 869 NaClAllModulesFini(); |
| 876 | 870 |
| 877 NaClExit(ret_code); | 871 NaClExit(ret_code); |
| 878 | 872 |
| 879 /* Unreachable, but having the return prevents a compiler error. */ | 873 /* Unreachable, but having the return prevents a compiler error. */ |
| 880 return ret_code; | 874 return ret_code; |
| 881 } | 875 } |
| OLD | NEW |