diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-10-24 22:52:48 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-10-24 22:52:48 -0700 |
commit | 7df0ea4ec45b33046a499f34388f389be91a0f67 (patch) | |
tree | 40d5d26273703af0b879b781804018909fc3d00d /subx/012elf.cc | |
parent | 261b1b80563155cc7731616d94e735afe19097a0 (diff) | |
download | mu-7df0ea4ec45b33046a499f34388f389be91a0f67.tar.gz |
4720
Raise an error when we fall off the end of the code segment.
Diffstat (limited to 'subx/012elf.cc')
-rw-r--r-- | subx/012elf.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/subx/012elf.cc b/subx/012elf.cc index 2e10246e..28064a1e 100644 --- a/subx/012elf.cc +++ b/subx/012elf.cc @@ -12,8 +12,8 @@ if (is_equal(argv[1], "run")) { load_elf(argv[2], argc, argv); while (EIP < End_of_program) // weak final-gasp termination check run_one_instruction(); - trace(90, "load") << "executed past end of the world: " << EIP << " vs " << End_of_program << end(); - return 0; + raise << "executed past end of the world: " << EIP << " vs " << End_of_program << '\n' << end(); + return 1; } :(code) |