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
Can't json decode Chinese character on arm platform #3142
Comments
Hello! we are facing same issue. This blocks our migration to arm64. It works ok with latest version and amd64 version thought. Cheers, |
@edsiper Is this a known limitation of the arm64 build? |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
ping |
@nokute78 Would this be something you would be able to help with? I recall you helping with some localization issues before |
I excerpted from flb_unescape.c and try to print japanese. I can reproduce it on Ubuntu 20.04 (x86_64) and qemu which emulates aarch64.
On x86_64, it outputs successfully.
|
Casting result is different. (signed char -> unsigned uint32_t) Line 187 in 8b8d82a
example code#include <stdio.h>
#include <stdint.h>
int main() {
char a = -1;
printf("a = %0x\n", a);
printf("a(uint32_t) = %0x\n", (uint32_t)a);
} On x86_64
On aarch64
|
Hmm, |
Refer to Draft of ISO/IEC 9899:201x, (char) -1 will be converted to (uint32_t) UINT32_MAX in my understanding.
|
I excerpted flb_unescape.c from v1.0.4 ,which fluent-bit works good both on arm and x86, but I didn't get expected output,
so I add some conditional statements taken from v1.7.4
but still face the same problem on arm
emmm... |
@nokute78 @edsiper Hi~ I seem found a solution,
|
@YukkiKaze Thank you for pointing it! |
The patch #3522 is merged. |
Bug Report
Describe the bug
on arm platform, regex parser with
Decode_Field_As
can't work correctly.this is fluent-bit error log:
To Reproduce
Rubular link if applicable: https://rubular.com/r/p3ryl22EbVRU00
Steps to reproduce the problem:
with above parser and the example log with Chinese character or other special character like '《》' will reproduce it.
Expected behavior
Screenshots
Your Environment
parser.conf
Additional context
and I tested it on x86 machine, it works ok, this issue only occurs on a arm machine.
The text was updated successfully, but these errors were encountered: