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

MSAN use-of-uninitialized-value in FFI tests #55783

Closed
rmacnak-google opened this issue May 20, 2024 · 1 comment
Closed

MSAN use-of-uninitialized-value in FFI tests #55783

rmacnak-google opened this issue May 20, 2024 · 1 comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-ffi P3 A lower priority bug or feature request triaged Issue has been triaged by sub team

Comments

@rmacnak-google
Copy link
Contributor

ffi/function_structs_by_value_generated_args_native_test log
ffi/function_structs_by_value_generated_ret_arg_native_test log
ffi/function_structs_by_value_generated_args_test log

are flaky failing for both X64 and ARM64.

@dcharkes

@rmacnak-google rmacnak-google added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-ffi labels May 20, 2024
@dcharkes
Copy link
Contributor

Thanks @rmacnak-google.

Relevant logs:

stderr:
==27580==WARNING: MemorySanitizer: use-of-uninitialized-value
/b/s/w/ir/cache/builder/sdk/buildtools/linux-arm64/clang/bin/llvm-symbolizer: error: '[anon:dart-code]': No such file or directory
    #0 0xffffe74df9b0 in PassStructStruct16BytesMixed3x10 out/ReleaseMSANARM64/../../runtime/bin/ffi_test/ffi_test_functions_generated.cc:3808:25
    #1 0xfffff7587024  ([anon:dart-code]+0x7024)
    #2 0xffffe73bafe0  ([anon:dart-code]+0x3afe0)
stderr:
==27376==WARNING: MemorySanitizer: use-of-uninitialized-value
/b/s/w/ir/cache/builder/sdk/buildtools/linux-arm64/clang/bin/llvm-symbolizer: error: '[anon:dart-code]': No such file or directory
    #0 0xffffe7ffd9e4 in ReturnStructNestedIntStructAlignmentInt32 out/ReleaseMSANARM64/../../runtime/bin/ffi_test/ffi_test_functions_generated.cc:6238:13
    #1 0xfffff7587e04  ([anon:dart-code]+0x7e04)
    #2 0xfffff50e6858  ([anon:dart-code]+0x66858)
stderr:
==725132==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x7fd3d1c5003e in ReturnStructArgumentStructStruct32BytesHomogeneous out/ReleaseMSANX64/../../runtime/bin/ffi_test/ffi_test_functions_generated.cc:5962:36
    #1 0x7fd3e1486e3a  (<unknown module>)
    #2 0x7fd3de94448e  (<unknown module>)
stderr:
==725150==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x7f47351510f0 in ReturnStructNestedIntStructAlignmentInt32 out/ReleaseMSANX64/../../runtime/bin/ffi_test/ffi_test_functions_generated.cc:6238:13
    #1 0x7f4744185f79  (<unknown module>)
    #2 0x7f474185dbdd  (<unknown module>)
    #3 0x7f474185d6cf  (<unknown module>)
stderr:
==15165==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x7f4191c765e2 in PassStruct8BytesInlineArrayIntx4 out/ReleaseMSANX64/../../runtime/bin/ffi_test/ffi_test_functions_generated.cc:3412:13
    #1 0x7f41a1e85f79  (<unknown module>)
    #2 0x7f4192699cc2  (<unknown module>)

Seems to happen with multiple combinations of vm flags.

And it's all when std:couting parameters.

(And as opposed to earlier issues with std::cout (#43075), this is not failing inside the std lib, but on the actual parameters.)

Link to flakes on dashboard: https://dart-current-results.web.app/#/filter=ffi/function_structs_by_value&flaky

Link to flakiness dashboard: msan and ffi.

Some more similar existing failures:

https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8747900274836325473/+/u/test_results/ignored_flaky_test_failure_logs

stderr:
==572662==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x7fd6ca648b0c in PassUnion9BytesNestedIntx10 out/ReleaseMSANX64/../../runtime/bin/ffi_test/ffi_test_functions_generated.cc:4425:57
    #1 0x7fd6da385f79  (<unknown module>)
    #2 0x7fd6caf3df24  (<unknown module>)

https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8749893407485939393/+/u/test_results/ignored_flaky_test_failure_logs

stderr:
==311022==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x7f537f8c944e in PassUint8Struct32BytesInlineArrayMultiDimensionalI out/ReleaseMSANX64/../../runtime/bin/ffi_test/ffi_test_functions_generated.cc:3918:13
    #1 0x7f538f286e3a  (<unknown module>)

This has been happing for a while, going as far back as 2023-05-xx.

@a-siva a-siva added P3 A lower priority bug or feature request triaged Issue has been triaged by sub team labels May 29, 2024
copybara-service bot pushed a commit that referenced this issue Nov 11, 2024
 - Fix early exit from MemoryCopyInstr bypassing MsanUnpoison
 - Fix missing MsanUnpoison for unrolled case
 - Fix flakey failure from safepointing clobbering MsanUnpoisonParam

TEST=msan
Bug: #55783
Bug: #55794
Change-Id: Ifbf440fa8741d426643414c530c8876543451697
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/394580
Commit-Queue: Ryan Macnak <[email protected]>
Reviewed-by: Alexander Aprelev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-ffi P3 A lower priority bug or feature request triaged Issue has been triaged by sub team
Projects
None yet
Development

No branches or pull requests

3 participants