D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 15876 - various cases of SEGFAULT when formatting parser errors
Summary: various cases of SEGFAULT when formatting parser errors
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 normal
Assignee: No Owner
URL:
Keywords: ice, pull
Depends on:
Blocks:
 
Reported: 2016-04-04 23:23 UTC by Alex Parrill
Modified: 2020-03-21 03:56 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Alex Parrill 2016-04-04 23:23:52 UTC
Probably related to https://issues.dlang.org/show_bug.cgi?id=15855, though it apparently applies to more than just the for keyword.

Example file contents (one file per line):

    o[{scope(x
    o[{template
    d(={for
    typeof){for
    p[{alias
    p(={alias

Similar to the linked issue, DMD spits out some error messages and then terminates with a segfault. DMD v2.070.2
Comment 1 ag0aep6g 2016-04-05 05:04:53 UTC
(In reply to Alex Parrill from comment #0)
>     d(={for
>     typeof){for

These two don't segfault anymore with git master (6199fd3).
Comment 2 Nicholas Wilson 2018-11-24 11:18:49 UTC
none of these segfault anymore
Comment 3 ag0aep6g 2018-11-24 14:28:12 UTC
Reopening. I still get segfaults. Tested with git master (DMD64 D Compiler v2.083.0-326-g1e902fc61). Remember to test one line at a time, not all at once.
Comment 4 basile-z 2018-11-24 15:44:58 UTC
pull : https://github.com/dlang/dmd/pull/9007
Comment 5 github-bugzilla 2018-11-24 23:58:19 UTC
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/866c0a3f3ac21d506140b4806bb9134334683f21
fix issue 15876 - various cases of SEGFAULT when formatting parser errors

https://github.com/dlang/dmd/commit/da15e2f2e21c7a81dea8022dfbe61d0bdec18258
Merge pull request #9007 from BBasile/hdrgen-unsafe-accesses

fix issue 15876 - various cases of SEGFAULT when formatting parser errors
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>