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

Unix channels trigger valgrind errors #230

Open
jdm opened this issue Mar 21, 2019 · 1 comment
Open

Unix channels trigger valgrind errors #230

jdm opened this issue Mar 21, 2019 · 1 comment

Comments

@jdm
Copy link
Member

jdm commented Mar 21, 2019

One example from https://paste.sh/LwlXNbkD#GFVUcztjTpQbNpZoVKg4SDmI:

==130127== Thread 57 LayoutThread Pip:
==130127== Syscall param sendmsg(msg.msg_control) points to uninitialised byte(s)
==130127==    at 0xE7E83A7: __libc_sendmsg (sendmsg.c:28)
==130127==    by 0xE7E83A7: sendmsg (sendmsg.c:25)
==130127==    by 0x953F937: ipc_channel::platform::unix::OsIpcSender::send::send_first_fragment (mod.rs:284)
==130127==    by 0x953ED06: ipc_channel::platform::unix::OsIpcSender::send (mod.rs:336)
==130127==    by 0x56D6B1E: <ipc_channel::ipc::IpcSender<T>>::send::{{closure}}::{{closure}} (ipc.rs:189)
==130127==    by 0x577523E: <std::thread::local::LocalKey<T>>::try_with (local.rs:300)
==130127==    by 0x577367B: <std::thread::local::LocalKey<T>>::with (local.rs:246)
==130127==    by 0x56D5C51: <ipc_channel::ipc::IpcSender<T>>::send::{{closure}} (ipc.rs:171)
==130127==    by 0x5774D0E: <std::thread::local::LocalKey<T>>::try_with (local.rs:300)
==130127==    by 0x5773442: <std::thread::local::LocalKey<T>>::with (local.rs:246)
==130127==    by 0x56D5B41: <ipc_channel::ipc::IpcSender<T>>::send (ipc.rs:170)
==130127==    by 0x56F032E: <gfx::font_cache_thread::FontCacheThread as gfx::font_context::FontSource>::font_template (font_cache_thread.rs:537)
==130127==    by 0x4ADD77B: <gfx::font_context::FontContext<S>>::font_template::{{closure}} (font_context.rs:162)
==130127==  Address 0x207bbe64 is 20 bytes inside a block of size 24 alloc'd
==130127==    at 0xD77E77F: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==130127==    by 0x953F686: ipc_channel::platform::unix::OsIpcSender::send::send_first_fragment (mod.rs:245)
==130127==    by 0x953ED06: ipc_channel::platform::unix::OsIpcSender::send (mod.rs:336)
==130127==    by 0x56D6B1E: <ipc_channel::ipc::IpcSender<T>>::send::{{closure}}::{{closure}} (ipc.rs:189)
==130127==    by 0x577523E: <std::thread::local::LocalKey<T>>::try_with (local.rs:300)
==130127==    by 0x577367B: <std::thread::local::LocalKey<T>>::with (local.rs:246)
==130127==    by 0x56D5C51: <ipc_channel::ipc::IpcSender<T>>::send::{{closure}} (ipc.rs:171)
==130127==    by 0x5774D0E: <std::thread::local::LocalKey<T>>::try_with (local.rs:300)
==130127==    by 0x5773442: <std::thread::local::LocalKey<T>>::with (local.rs:246)
==130127==    by 0x56D5B41: <ipc_channel::ipc::IpcSender<T>>::send (ipc.rs:170)
==130127==    by 0x56F032E: <gfx::font_cache_thread::FontCacheThread as gfx::font_context::FontSource>::font_template (font_cache_thread.rs:537)
==130127==    by 0x4ADD77B: <gfx::font_context::FontContext<S>>::font_template::{{closure}} (font_context.rs:162)
@jdm
Copy link
Member Author

jdm commented Mar 21, 2019

It looks like due to alignment we could end up sending bytes that we don't actually initialize. I don't think we ever read from it, however.

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

No branches or pull requests

1 participant