Bug 19593 – dstrcmp with -profile causes stack overflow

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2019-01-18T05:10:42Z
Last change time
2019-01-19T18:23:15Z
Assigned to
No Owner
Creator
Hiroki Noda

Comments

Comment #0 by kubo39 — 2019-01-18T05:10:42Z
I got stack overflow this with -profile option. --- void main() { auto r = "abc" >= "abc"; } --- The reason is that dmd wraps dstrcmp function body with trace_pro.
Comment #1 by github-bugzilla — 2019-01-19T18:23:13Z
Commits pushed to master at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/009ec426545a586c13b14966f3a8246285673580 Fix Issue 19593 - use memcmp instead of dstrcmp Using dstrcmp inside trace_addsym causes stack overflow, because dmd inserts trace_pro function to top of dstrcmp when -profile is added. https://github.com/dlang/druntime/commit/59607879d66de79e2fa159048ae74e52c7876ea6 Merge pull request #2467 from kubo39/fix-issue19593 Fix Issue 19593 - use memcmp instead of dstrcmp merged-on-behalf-of: Rainer Schuetze <[email protected]>