<div dir="ltr">Hi everyone,<div><br></div><div>I ran into a false positive with memory sanitizer due to it not intercepting dlinfo. I tried to get started on writing such an interceptor, but dlinfo seems like an extraordinarily difficult function to intercept. The three considerations that I would like somebody to look at are:</div><div><br></div><div>1) How do we get the enum values to decide what kind of pointer dlinfo is getting. Ideally we'd include dlfcn.h, but the interceptor file doesn't generally include system headers. What's the right thing to do here?</div><div>2) The structures pointed to contain linked lists, etc. of dynamic linker state. In order to avoid spurious failures, it seems like we should iterate the linked lists and unpoison all of them, but that seems expensive. Do you see a better solution?</div><div>3) The return values include pointers into the object files. It seems perfectly reasonable for a user to want to read these object files based on information from dlinfo. That probably means we should unpoison them as well? Do we need to do something here or are these already unpoisoned by some other mechanism (e.g. because msan realizes they are part of a loaded object file or unposions them on load - does this happen?).</div><div><br></div><div>Thanks,</div><div>Keno</div><div><br></div><div><br></div></div>