Bug 15257 – __traits(compiles, …) with malformed inline asm silently ends compilation

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2015-10-29T12:07:22Z
Last change time
2020-08-21T05:36:07Z
Keywords
iasm, pull
Assigned to
Cauterite
Creator
Cauterite

Comments

Comment #0 by cauterite — 2015-10-29T12:07:22Z
https://ideone.com/5tn592 When DMD hits this: __traits(compiles, { asm {#$%^&*;} }); it runs asmerr(…) which is supposed to print the error ( verror(…) ) and exit(). However, because __traits(compiles sets global.gag to 1, verror never prints anything, so the compiler exits with no error message whatsoever.
Comment #1 by dlang-bugzilla — 2015-10-30T11:16:38Z
Timeline: 2.058: Shows error message 2.059: Segfaults 2.060: Exits silently
Comment #2 by dlang-bugzilla — 2015-10-30T11:26:43Z
Comment #3 by cauterite — 2015-10-30T11:27:51Z
(In reply to Vladimir Panteleev from comment #2) > https://github.com/D-Programming-Language/dmd/pull/5244 Thanks, not sure why the pull didn't get posted here automatically.
Comment #4 by dlang-bugzilla — 2015-10-30T11:38:31Z
(In reply to Cauterite from comment #3) > Thanks, not sure why the pull didn't get posted here automatically. It's not, you have to post it yourself. http://wiki.dlang.org/Pull_Requests#Create_a_pull_request
Comment #5 by cauterite — 2015-10-30T11:48:32Z
(In reply to Vladimir Panteleev from comment #4) > (In reply to Cauterite from comment #3) > > Thanks, not sure why the pull didn't get posted here automatically. > > It's not, you have to post it yourself. > > http://wiki.dlang.org/Pull_Requests#Create_a_pull_request Ah, whoops. I think the wording on that page is a bit ambiguous.
Comment #6 by dlang-bugzilla — 2015-10-30T11:49:24Z
(In reply to Cauterite from comment #5) > I think the wording on that page is a bit ambiguous. It's a wiki, fix it :)
Comment #7 by cauterite — 2016-08-19T21:55:54Z
New pull request: https://github.com/dlang/dmd/pull/6068 I could use some help identifying the cause of buggy behaviour introduced by this patch; see: https://github.com/dlang/dmd/pull/6068#issuecomment-240745667
Comment #8 by dlang-bot — 2020-08-20T07:07:12Z
@WalterBright created dlang/dmd pull request #11597 "fix Issue 15257 - __traits(compiles, .) with malformed inline asm sil…" fixing this issue: - fix Issue 15257 - __traits(compiles, .) with malformed inline asm silently ends compilation https://github.com/dlang/dmd/pull/11597
Comment #9 by dlang-bot — 2020-08-21T05:36:07Z
dlang/dmd pull request #11597 "fix Issue 15257 - __traits(compiles, .) with malformed inline asm sil…" was merged into master: - 282b81d4ea1f80ad967a69a5dc5c03cb3d2f2c1a by Walter Bright: fix Issue 15257 - __traits(compiles, .) with malformed inline asm silently ends compilation https://github.com/dlang/dmd/pull/11597