-
-
Notifications
You must be signed in to change notification settings - Fork 264
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
Add the -fsanitize-blacklist option for the sanitizers. #2261
Conversation
|
Ah ofcourse. Windows mangling. |
e7a29d5
to
6dfb705
Compare
|
Any concerns? |
|
Looks good after a quick glance, just one thing: we shouldn't use the IR function name, as the necessity to fix up the testcase for Win32 clearly shows. ;) |
|
I thought about using the "normal" function name, without the \01 added for Win32, but then I thought that because of different underscore conventions, the start of the mangled name is already different anyway so you'd have to use a * at the start already ("*_D...."). The blacklist for Clang is using mangled names, and I don't want to deviate from that. |
|
(eager to get this in btw, it's annoying me with asan work) |
|
(also, I could get rid of the extra _ added for win32.......) |
|
I meant just using the regular D mangle ( |
040a7af
to
a120dfa
Compare
|
Yep indeed, I am already reworking things. function.cpp should just check whether the FuncDecl is in the blacklist, without concerning itself about mangling/blacklist details. I've changed the lookup to use mangleExact (whose returned string is cached). |
|
(I wanted things to be as close as possible to the real mangled name in the object file, including hashing. But... I can think of other use cases where blacklisting using the non-hashed name makes more sense. So I'm happy with mangleExact too) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took the liberty to address my last nit, passing front-end objects unnaturally by reference (and so wouldn't be callable from D via D object reference, which is to be mangled as pointer for C++ functions).
|
The by-reference was intentional: the interface does not allow passing null pointers. |
|
I'll merge when Travis is green. |
…accessible from outside.
Refs don't protect from passing nulls under the hood, the segfault (in |
Having fun with ASan :)
Blacklisting is necessary for some druntime functions, and LLVM/Clang already provides just the right functionality.
Will add the actual needed blacklist in a later PR.