-
-
Notifications
You must be signed in to change notification settings - Fork 262
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
equivalent for dmd's -gx
option (add stack stomp code) ?
#2489
Comments
Please post questions in the forum, the issue tracker is for issues. |
Are you asking this because you're still pursuing mixing code compiled by different compilers? |
was trying to debug a crash and was searching for an equivalent of dmd's -gx which could've helped with that.
that was unrelated to that effort. But I was indeed able to mix code produced by ldc and dmd in some example program, using proper symbol hiding (eg: only un-hide symbols for critical hot path functions). This is useful for combining compilation speed of dmd with runtime speed of ldc (for hot functions which don't need to be recompiled often) |
I'd say LDC's answer to Wrt. mixing the code, did it pay off, compile-time wise? ;) |
Yep, check out the different sanitizers for help with that sort of corruption issue (AddressSanitizer might be able to help you in that particular case). There are probably some more Clang/LLVM ideas we could steal if there is a concrete need. |
|
with a special value (but not 0 IIRC)
why enabled inlining? my use case is to combine fast recompilation (dmd with no optimizations) with fast runtime speed (ldc with optmizations, for parts of the program i'm not editing) |
Just saying that DMD isn't generally faster. I'm wondering how many seconds you'd hope to gain by compiling the non-optimized active parts by DMD instead of LDC. |
clang has |
That uses canary values to make stack buffer overflows non-exploitable. I'm not sure whether there is a direct analogon to -gx in LLVM, but AddressSanitizer should catch use-after-return issues just fine (in fact, in a much more useful fashion). Hence the above comment - the answer to your original question is "no", but that's not really actionable. If you have a particular debugging situation where the sanitisers are not enough, we can see what else LLVM has to offer to help. |
Currently that does not work for LDC, because it is non-trivial to make detect_stack_use_after_return work. The other use case of |
-gx
option (add stack stomp code) ? (for ldmd2 and ldc2)-gs
(always emit stack frame)?The text was updated successfully, but these errors were encountered: