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

519c2221 triggered ASAN errors #47460

Closed
ghost opened this issue Oct 14, 2021 · 1 comment
Closed

519c2221 triggered ASAN errors #47460

ghost opened this issue Oct 14, 2021 · 1 comment
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. gardening type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@ghost
Copy link

ghost commented Oct 14, 2021

Several ASAN issues have surfaced after 519c222:
https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8833423770193018001/+/u/test_results/new_test_failures__logs_

vm/cc/DartAPI_InvokeVMServiceMethod broke (Pass -> Crash, expected Pass)
vm/cc/DartAPI_InvokeVMServiceMethod_Loop broke (Pass -> Crash, expected Pass)
vm/dart_2/isolates/reload_active_stack_test broke (Pass -> RuntimeError, expected Pass)
vm/dart_2/isolates/reload_many_isolates_test broke (Pass -> RuntimeError, expected Pass)
vm/dart_2/isolates/reload_no_active_stack_test broke (Pass -> RuntimeError, expected Pass)

E.g.:

=================================================================
==22980==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 256 byte(s) in 1 object(s) allocated from:
    #0 0x5590ae7a1153 in realloc ../staging/llvm_build/tools/clang/stage2-bins/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/compiler-rt/lib/asan/asan_malloc_linux.cpp:148:3
    #1 0x5590af231206 in dart::realloc(void*, unsigned long) ../../out/ReleaseASANX64/../../runtime/platform/allocation.cc:20:18
    #2 0x5590af23473e in dart::TextBuffer::EnsureCapacity(long) ../../out/ReleaseASANX64/../../runtime/platform/text_buffer.cc:146:45
    #3 0x5590af232f1c in dart::BaseTextBuffer::VPrintf(char const*, __va_list_tag*) ../../out/ReleaseASANX64/../../runtime/platform/text_buffer.cc:30:10
    #4 0x5590af232f1c in dart::BaseTextBuffer::Printf(char const*, ...) ../../out/ReleaseASANX64/../../runtime/platform/text_buffer.cc:17:18
    #5 0x5590af371a06 in dart::Dart::FeaturesString(dart::IsolateGroup*, bool, dart::Snapshot::Kind) ../../out/ReleaseASANX64/../../runtime/vm/dart.cc:1098:5
    #6 0x5590af82bbe4 in dart::Service::PrintJSONForVM(dart::JSONStream*, bool) ../../out/ReleaseASANX64/../../runtime/vm/service.cc:4892:34
[...]
    #31 0x5590af8a12ff in dart::ThreadPool::Worker::Main(unsigned long) ../../out/ReleaseASANX64/../../runtime/vm/thread_pool.cc:323:9

SUMMARY: AddressSanitizer: 256 byte(s) leaked in 1 allocation(s).
@ghost ghost added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Oct 14, 2021
@mkustermann
Copy link
Member

Several ASAN issues have surfaced after 519c222:

Don't think this commit can be related in any way to those asan failures.

This memory leak got introduced in b5c911e, which added a usage of Dart::FeaturesString() but didn't free the resulting string. I've made a fix in cl/216802

@mkustermann mkustermann self-assigned this Oct 14, 2021
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. gardening type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

1 participant