Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: monitor dumps 0xffffff prefix for signed char #2482

Merged
merged 2 commits into from
Aug 10, 2024

Conversation

PragmaTwice
Copy link
Member

EscapeString can dump lots of 0xffffff since it uses char instead of unsigned char, and char can be signed in some implementation.

1723250717.413402 [__namespace 127.0.0.1:52032] "HSET" "8193" "vector" "\x00\x00\x00\xffffffa0B\xffffffca\xffffffbf\xffffffbf\x00\x00\x00@\xffffffb3$\xffffffe4\xffffffbf\x00\x00\x00 \xffffff95\xffffffd4\xfffffff2?\x00\x00\x00\xffffffa0\xffffffca\xffffffdb\xffffffd5\xffffffbf\x00\x00\x00\xffffff80/L\xfffffff6\xffffffbf\x00\x00\x00\xffffffa0\xffffff80&\xfffffffc?\x00\x00\x00\xffffff80\xffffffa7W\xfffffff8?\x00\x00\x00\xffffff80\xffffffc2\xfffffff5\x02\xffffffc0\x00\x00\x00\xffffffa0\xffffff92:\xffffffff\xffffffbf\x00\x00\x00\xffffffc0^\xffffffef\xffffffef\xffffffbf\x00\x00\x00 \x17\xfffffff1\xffffffd3?\x00\x00\x00`\xffffffd5\xffffffe7\xfffffff3?\x00\x00\x00\x00\x17H\xfffffff7?\x00\x00\x00\xffffffc0d\xffffffaa\xfffffff9?\x00\x00\x00\x00zS\xffffffea?\x00\x00\x00\xffffffc0\xffffffd5s\xffffffc6\xffffffbf\x00\x00\x00@yX\x02\xffffffc0\x00\x00\x00@\xffffffb6\xfffffff3\xffffffd3\xffffffbf\x00\x00\x00\xffffffe0\x18\xffffffad\xffffffeb\xffffffbf\x00\x00\x00\xffffffc0\xfffffff3\xfffffffd\xffffffe5?\x00\x00\x00`\xffffffa85\xfffffff1\xffffffbf\x00\x00\x00@\xffffff94\xffffffda\xffffffb7\xffffffbf\x00\x00\x00 \xffffffad\xffffff86\xffffffe4?\x00\x00\x00\xffffffc0b\x7f\xfffffffa?\x00\x00\x00\x008\xffffffa1\xffffffeb?"

Here we fixed it by a type cast.

@PragmaTwice PragmaTwice requested a review from git-hulk August 10, 2024 01:08
Copy link

sonarcloud bot commented Aug 10, 2024

@PragmaTwice PragmaTwice merged commit 2d2d981 into apache:unstable Aug 10, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants