Bug 16460 – [REG2.071] ICE for package visibility check in function literal

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2016-09-02T01:37:00Z
Last change time
2016-11-04T09:05:03Z
Keywords
ice, pull
Assigned to
code
Creator
jiki
See also
https://issues.dlang.org/show_bug.cgi?id=16348

Comments

Comment #0 by jiki — 2016-09-02T01:37:57Z
Internal AV with Windows 7 64-bit and Win10. This seems to be a 2.071 regression about package access. 2.071.2 beta3 doesn't fix it. Reduced code is here. COMMAND: dmd test.d imp.d RESULT: object.Error@(0): Access Violation ---------------- 0x00402502 0x0108B660 0x0108C100 CODE: *imp.d module pkg.imp; package void pkgFunc() { } // package access needs *test.d module pkg.test; void main() { //import pkg.imp; // this works enum d = (){ import pkg.imp; // this crashes pkgFunc(); }; }
Comment #1 by jiki — 2016-09-12T23:58:41Z
This looks like Issue 16348, but is NOT. 2.071.2 beta4 doesn't fix.
Comment #2 by code — 2016-09-13T05:33:10Z
(In reply to jiki from comment #1) > This looks like Issue 16348, but is NOT. > 2.071.2 beta4 doesn't fix. It's another instance of Issue 16384, just a different place where the scope gets created without scope symbol. https://github.com/dlang/dmd/pull/6128
Comment #3 by github-bugzilla — 2016-09-13T11:11:01Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/0c9374cec813f8b29483bebd5a659be55958c299 fix Issue 16460 - ICE for package visibility check in function literal - fixed by skipping symbol-less scopes when establishing scope for FuncDeclaration - symbol-less scopes like Scope.startCTFE and FuncExp scopes don't require a symbol table (and thus don't create a scopesym) https://github.com/dlang/dmd/commit/8679fd9b9b5f401f834047cd0c14ebd338566cfd Merge pull request #6128 from MartinNowak/fix16460 fix Issue 16460 - ICE for package visibility check in function literal
Comment #4 by github-bugzilla — 2016-09-27T04:01:21Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/0c9374cec813f8b29483bebd5a659be55958c299 fix Issue 16460 - ICE for package visibility check in function literal https://github.com/dlang/dmd/commit/8679fd9b9b5f401f834047cd0c14ebd338566cfd Merge pull request #6128 from MartinNowak/fix16460
Comment #5 by github-bugzilla — 2016-11-04T09:05:03Z
Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/0c9374cec813f8b29483bebd5a659be55958c299 fix Issue 16460 - ICE for package visibility check in function literal https://github.com/dlang/dmd/commit/8679fd9b9b5f401f834047cd0c14ebd338566cfd Merge pull request #6128 from MartinNowak/fix16460