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

cgen: fix auto eq for fixed array #23169

Merged
merged 9 commits into from
Dec 15, 2024

Conversation

felipensp
Copy link
Member

@felipensp felipensp commented Dec 15, 2024

Fix vlib/json/tests/json_generic_array_test.v failing test

Fix #23149

Huly®: V_0.6-21606

@felipensp felipensp changed the title cgen: fix sanitize failing test cgen: fix memcmp for array fixed - fix ci sanitize failing test Dec 15, 2024
@felipensp felipensp marked this pull request as ready for review December 15, 2024 02:06
@felipensp felipensp requested a review from spytheman December 15, 2024 02:09
@spytheman
Copy link
Member

It still fails one of the sanitized checks for:

#0 09:56:27 ^ master /v/oo>./v -keepc -cg -cc clang-18 -cflags -fsanitize=memory vlib/json/tests/json_generic_array_test.v
Uninitialized bytes in MemcmpInterceptorCommon at offset 4 inside [0x7fffffffbe18, 32)
==2255226==WARNING: MemorySanitizer: use-of-uninitialized-value
/usr/bin/llvm-symbolizer-18: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/llvm-symbolizer-18)
    #0 0x5555555d3625 in memcmp (/space/v/oo/vlib/json/tests/json_generic_array_test+0x7f625) (BuildId: eef1284e3cc1c46b79b037fa8f91e8c96d6db0ed)
    #1 0x5555556838ba in _option_Array_fixed_int_1_arr_eq /tmp/v_1000/json_generic_array_test.tmp.c:4218:7
    #2 0x5555556840ea in main__DocumentFindFilter_T_int_struct_eq /tmp/v_1000/json_generic_array_test.tmp.c:4232:77
    #3 0x55555570f761 in main__test_int /tmp/v_1000/json_generic_array_test.tmp.c:10751:6
    #4 0x555555714a94 in main /tmp/v_1000/json_generic_array_test.tmp.c:10930:3
    #5 0x7ffff7be8082 in __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/../csu/libc-start.c:308:16
    #6 0x55555559466d in _start (/space/v/oo/vlib/json/tests/json_generic_array_test+0x4066d) (BuildId: eef1284e3cc1c46b79b037fa8f91e8c96d6db0ed)

SUMMARY: MemorySanitizer: use-of-uninitialized-value (/space/v/oo/vlib/json/tests/json_generic_array_test+0x7f625) (BuildId: eef1284e3cc1c46b79b037fa8f91e8c96d6db0ed) in memcmp
Exiting
#1 09:57:10 ^ master /v/oo>

@felipensp felipensp changed the title cgen: fix memcmp for array fixed - fix ci sanitize failing test cgen: fix auto eq for fixed array Dec 15, 2024
Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work.

I think it will pass this time all sanitized CI jobs.

@spytheman
Copy link
Member

vlib/v/tests/assert_alias_array_test.v is missing (it was reverted on master)

@felipensp
Copy link
Member Author

vlib/v/tests/assert_alias_array_test.v is missing (it was reverted on master)

Oh thanks.

@spytheman spytheman merged commit ca1e23a into vlang:master Dec 15, 2024
72 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.

C error on compare aliased arrays with initialisation: Arr{} == Arr{}
2 participants