pyOCD icon indicating copy to clipboard operation
pyOCD copied to clipboard

tcp_client sends non-conformant JSON

Open buzmeg opened this issue 8 months ago • 1 comments

In the transaction I see: {"id": 11, "request": "swj_sequence", "arguments": [51, 72057594037927935]}

That's a bug waiting to happen. 72057594037927935 is larger than 9007199254740991 (aka Number.MAX_SAFE_INTEGER).

The protocol probably needs to have these kinds of integers (which are actually bitstrings anyway) converted to hex strings and have a protocol version bump.

buzmeg avatar May 06 '25 22:05 buzmeg

This is a double bug in that the swj_sequence only clocks 51 bits anyway. Consequently, the number is overly large for no reason.

buzmeg avatar May 08 '25 22:05 buzmeg