about summary refs log tree commit diff stats
path: root/cpp/.traces
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-04-22 22:34:34 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-04-22 22:40:46 -0700
commitf1e953d0cf7f5669a55b1337a87e646c1262d139 (patch)
tree4202cb6dc09fee952ca0085fae95ebd78c876084 /cpp/.traces
parent547ec78bf27e37e7a1552d99185200fef460bb38 (diff)
downloadmu-f1e953d0cf7f5669a55b1337a87e646c1262d139.tar.gz
1146 - yet another out-of-bounds access
There's a test in this commit, but it doesn't actually fail, because by
some accident the memory at index 2 of recipe 'f' has data at the
is_label offset and breaks out of the loop. Graah. How did I ever
misplace that "Reading One Instruction" waypoint? I could swear I was
concerned about this possibility when I implemented calls.

Today has been tough on my confidence. STL helps avoid memory leaks but
doesn't help with buffer overflows nearly as much as I thought.

Oh brilliant, valgrind caught the problem! And there weren't any others.
I feel much better.
Diffstat (limited to 'cpp/.traces')
-rw-r--r--cpp/.traces/return_on_fallthrough40
1 files changed, 40 insertions, 0 deletions
diff --git a/cpp/.traces/return_on_fallthrough b/cpp/.traces/return_on_fallthrough
new file mode 100644
index 00000000..4408c63a
--- /dev/null
+++ b/cpp/.traces/return_on_fallthrough
@@ -0,0 +1,40 @@
+parse/0: instruction: 1001
+parse/0: instruction: 1
+parse/0:   ingredient: {name: "34", value: 0, type: 0, properties: ["34": "literal"]}
+parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
+parse/0: instruction: 1
+parse/0:   ingredient: {name: "34", value: 0, type: 0, properties: ["34": "literal"]}
+parse/0:   product: {name: "2", value: 0, type: 1, properties: ["2": "integer"]}
+parse/0: instruction: 1
+parse/0:   ingredient: {name: "34", value: 0, type: 0, properties: ["34": "literal"]}
+parse/0:   product: {name: "3", value: 0, type: 1, properties: ["3": "integer"]}
+parse/0: instruction: 1
+parse/0:   ingredient: {name: "34", value: 0, type: 0, properties: ["34": "literal"]}
+parse/0:   product: {name: "4", value: 0, type: 1, properties: ["4": "integer"]}
+parse/0: instruction: 1
+parse/0:   ingredient: {name: "34", value: 0, type: 0, properties: ["34": "literal"]}
+parse/0:   product: {name: "5", value: 0, type: 1, properties: ["5": "integer"]}
+after-brace/0: recipe f
+after-brace/0: copy ...
+after-brace/0: copy ...
+after-brace/0: recipe main
+after-brace/0: f ...
+after-brace/0: copy ...
+after-brace/0: copy ...
+after-brace/0: copy ...
+run/0: instruction main/0
+run/0: instruction f/0
+run/0: ingredient 0 is 34
+mem/0: storing 34 in location 4
+run/0: instruction f/1
+run/0: ingredient 0 is 34
+mem/0: storing 34 in location 5
+run/0: instruction main/1
+run/0: ingredient 0 is 34
+mem/0: storing 34 in location 1
+run/0: instruction main/2
+run/0: ingredient 0 is 34
+mem/0: storing 34 in location 2
+run/0: instruction main/3
+run/0: ingredient 0 is 34
+mem/0: storing 34 in location 3