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