Fix Issue 19593 - use memcmp instead of dstrcmp #2467
Conversation
Thanks for your pull request and interest in making D better, @kubo39! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + druntime#2467" |
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 assume you are not recompiling the runtime with -profile, but that the issue is that rt.trace and your code reference the same symbol dstrcmp
, but also generate different implementations. The linker picks the one with profiling hooks causing the stack overflow in the profiler code.
Please also remove the respective import.
There seem to be other changes to the profile.log, too:
|
4e75a50
to
8ad851f
Compare
Ah, yes, I found this at |
Using dstrcmp inside trace_addsym causes stack overflow, because dmd inserts trace_pro function to top of dstrcmp when -profile is added.
8ad851f
to
009ec42
Compare
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.
LGTM
Using dstrcmp inside trace_addsym causes stack overflow, because dmd
inserts trace_pro function to top of dstrcmp when -profile option is added.