|
2013-09-16
| ||
| 23:25 | • Closed ticket [7b32d8d13b]: assembler brought low by jumps, labels, and nops... artifact: 2a9dd6c9cd user: dgp | |
| 23:19 | • Ticket [7b32d8d13b]: 3 changes artifact: 53fea59e5c user: dgp | |
| 23:18 | [7b32d8d13b] Insert missing field initialization. check-in: 7059c2ea37 user: dgp tags: trunk | |
| 22:51 | • Ticket [7b32d8d13b] assembler brought low by jumps, labels, and nops status ... artifact: 6068f7c1a6 user: dgp | |
| 22:43 | • Ticket [7b32d8d13b]: 3 changes artifact: 0b1ceedcb8 user: dgp | |
| 22:11 | • Ticket [7b32d8d13b]: 4 changes artifact: d35c91138a user: dgp | |
| 22:01 | • Ticket [7b32d8d13b]: 3 changes artifact: 1d03e20e6a user: dgp | |
| 21:46 | • Ticket [7b32d8d13b]: 3 changes artifact: c99af03d94 user: dgp | |
| 21:17 | • New ticket [7b32d8d13b]. artifact: 3b852f9325 user: dgp | |
assembler brought low by jumps, labels, and nops
Closed / Fixed7b32d8d13b0e0b3d999e3beb2cfdd866c1471b8fCreated 13 years agoUpdated 13 years ago
Descriptionplain2013-09-16 21:17:37
namespace path tcl::unsupported
append asm {push 0; label test; jumpTrue end; push 1; jump test;} [string repeat {nop;} 130] {label end}
proc demo {} [list assemble $asm]
puts working....
puts [disassemble proc demo]
puts done.
Referenced by1
7059c2ea37[7b32d8d13b] Insert missing field initialization. check-in2013-09-16 23:18:54
dgpplain2013-09-16 21:46:16
Well, I assumed it was the long jump, but the evidence says otherwise. Change the "130" value to "10" and it still segfaults.
dgpplain2013-09-16 22:01:20
setting the repeat count to 0, gets me:
working....
ByteCode 0x0x10087a910, refCt 1, epoch 15, interp 0x0x100849c10 (epoch 15)
Source "assemble {push 0; label test; jumpTrue end; push 1; jum"
Cmds 1, src 72, inst 11, litObjs 3, aux 0, stkDepth 1, code/src 0.00
Proc 0x0x1008b1f10, refCt 1, args 0, compiled locals 0
Commands 1:
1: pc 0-9, src 0-71
Command 1: "assemble {push 0; label test; jumpTrue end; push 1; jum"
(0) push1 0 # "0"
(2) jumpTrue1 +6 # pc 8
(4) push1 1 # "1"
(6) jump1 -4 # pc 2
(8) push1 2 # ""
(10) done
done.
Setting the count to just 1 (sticking in one "nop;")
brings it down.
dgpplain2013-09-16 22:11:35
paring away, I get a segfault from this:
tcl::unsupported::disassemble script {tcl::unsupported::assemble {
jump end; nop; label end
}}
dgpplain2013-09-16 22:43:12
Trouble is in BuildExceptionRanges() where a very very large value for maxCatchDepth is calculated.
dgpplain2013-09-16 22:51:04
...because bbPtr->catchDepth is not always properly initialized, it seems.
dgpplain2013-09-16 23:19:01
missing initialization committed to trunk.
dgpplain2013-09-16 23:25:34
...and that fixed it all. Yay!
Log in (anonymous is fine) to add a comment.