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

tools: improve valgrind support #25498

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tools/run-valgrind.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
VALGRIND_ARGUMENTS = [
'valgrind',
'--error-exitcode=1',
'--smc-check=all',
'--smc-check=all-non-file',
'--suppressions=' + path.join(NODE_ROOT, 'tools', 'valgrind.supp'),
'--gen-suppressions=all',
]

if len(sys.argv) < 2:
Expand All @@ -50,7 +52,8 @@
sys.exit(1)

# Compute the command line.
command = VALGRIND_ARGUMENTS + [executable] + sys.argv[2:]
command = VALGRIND_ARGUMENTS + [executable, '--zero-fill-buffers']
command += sys.argv[2:]

# Run valgrind.
process = subprocess.Popen(command, stderr=subprocess.PIPE)
Expand Down
106 changes: 106 additions & 0 deletions tools/valgrind.supp
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
<PW_trace_event>
Helgrind:Race
...
fun:_ZN4node12_GLOBAL__N_1L20PlatformWorkerThreadEPv
...
}
{
<tracing_group>
Helgrind:Race
...
fun:_ZN2v88platform7tracing17TracingController31GetCategoryGroupEnabledInternalEPKc
...
}
{
<locker_is_active>
Helgrind:Race
...
fun:_ZN2v86Locker8IsActiveEv
...
}
{
<locker_initialize>
Helgrind:Race
...
fun:_ZN2v86Locker10InitializeEPNS_7IsolateE
...
}
{
<set_embedded_blob>
Helgrind:Race
...
fun:_ZN2v88internal7Isolate15SetEmbeddedBlobEPKhj
...
}
{
<set_stack_limits>
Helgrind:Race
...
fun:_ZN2v88internal4Heap14SetStackLimitsEv
...
}
{
<current_embedded_blob_size>
Helgrind:Race
...
fun:_ZN2v88internal7Isolate23CurrentEmbeddedBlobSizeEv
...
}
{
<current_embedded_blob>
Helgrind:Race
...
fun:_ZN2v88internal7Isolate19CurrentEmbeddedBlobEv
...
}
{
<epoll_invalid_param>
Memcheck:Param
epoll_ctl(event)
fun:epoll_ctl
fun:uv__io_poll
...
obj:/home/sqrt/src/node/master/out/Release/node
}
{
<frame_ptr_ne>
Memcheck:Cond
...
fun:_ZN2v88internal9ExitFrame23GetStateForFramePointerEmPNS0_10StackFrame5StateE
...
}
{
<debug_signal_thread_stack_storage>
Memcheck:Leak
match-leak-kinds: possible
...
fun:pthread_create*
fun:_ZN4node9inspector12_GLOBAL__N_1L23StartDebugSignalHandlerEv
...
}
{
<copyfile_ioctl>
Memcheck:Param
ioctl(generic)
fun:*
fun:uv__fs_copyfile
...
}
{
<epoll_pwait>
Memcheck:Param
epoll_pwait(sigmask)
fun:*
fun:uv__io_poll
...
}
{
<platform_worker_threads_uv_loop_close_after_async_send>
Helgrind:Race
...
fun:uv_loop_close
fun:_ZN4node18CheckedUvLoopCloseEP9uv_loop_s
fun:_ZZN4node23WorkerThreadsTaskRunner20DelayedTaskScheduler5StartEvENUlPvE_4_FUNES2_
...
}