Bug 22224 – [REG 2.097.0] compiler segfaults with -profile

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2021-08-19T14:30:16Z
Last change time
2021-09-07T22:52:01Z
Keywords
pull
Assigned to
No Owner
Creator
uplink.coder

Comments

Comment #0 by uplink.coder — 2021-08-19T14:30:16Z
import core.stdc.stdarg; void error(...) { } The above code causes the compiler to crash when it's compiled with -profile.
Comment #1 by dlang-bot — 2021-08-19T14:48:49Z
@UplinkCoder created dlang/dmd pull request #12991 "Fix Issue 22224" fixing this issue: - Fix Issue 22224 https://github.com/dlang/dmd/pull/12991
Comment #2 by dlang-bot — 2021-08-23T11:57:57Z
dlang/dmd pull request #12991 "Fix Issue 22224 - [REG 2.097.0] compiler segfaults with -profile" was merged into stable: - 8c83c07640d4171708052cda3436ae05c349980b by Stefan Koch: Fix issue 22224 - [REG 2.097.0] compiler segfaults with -profile This fixes an issue where an analysis step inside semantic assumed that an expression is fully resolved. That means it has the type field set, to indicate semantic3 has been sucessfully run. This turns out not to be the case when -profile is used on a vaargs function. We now check that type is non null before dereference the pointer. Thereby averting the segfault. https://github.com/dlang/dmd/pull/12991
Comment #3 by dlang-bot — 2021-09-07T22:52:01Z
dlang/dmd pull request #13053 "merge stable" was merged into master: - b8b12503111f6041470b7b167f30ebd54a9a03a5 by Stefan Koch: Fix issue 22224 - [REG 2.097.0] compiler segfaults with -profile This fixes an issue where an analysis step inside semantic assumed that an expression is fully resolved. That means it has the type field set, to indicate semantic3 has been sucessfully run. This turns out not to be the case when -profile is used on a vaargs function. We now check that type is non null before dereference the pointer. Thereby averting the segfault. https://github.com/dlang/dmd/pull/13053