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 |
547 /* Sanity check. */ | 553 /* Sanity check. */ |
548 NaClSignalAssertNoHandlers(); | 554 NaClSignalAssertNoHandlers(); |
549 | 555 |
550 if (handle_signals) { | 556 if (handle_signals) { |
551 NaClSignalHandlerInit(); | 557 NaClSignalHandlerInit(); |
552 } else { | 558 } else { |
553 /* | 559 /* |
554 * Patch the Windows exception dispatcher to be safe in the case | 560 * Patch the Windows exception dispatcher to be safe in the case |
555 * of faults inside x86-64 sandboxed code. The sandbox is not | 561 * of faults inside x86-64 sandboxed code. The sandbox is not |
556 * secure on 64-bit Windows without this. | 562 * secure on 64-bit Windows without this. |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 fflush(stdout); | 912 fflush(stdout); |
907 | 913 |
908 if (handle_signals) NaClSignalHandlerFini(); | 914 if (handle_signals) NaClSignalHandlerFini(); |
909 NaClAllModulesFini(); | 915 NaClAllModulesFini(); |
910 | 916 |
911 NaClExit(ret_code); | 917 NaClExit(ret_code); |
912 | 918 |
913 /* Unreachable, but having the return prevents a compiler error. */ | 919 /* Unreachable, but having the return prevents a compiler error. */ |
914 return ret_code; | 920 return ret_code; |
915 } | 921 } |
OLD | NEW |