{"issue":{"state":"open","created_at":"2011-11-29T22:10:41Z","updated_at":"2011-12-02T16:59:43Z","comments":1,"user":{"gravatar_id":"4a2e0b7d905b4a7841e489e9f100eb50","id":580325,"url":"https://api.github.com/users/Poita","avatar_url":"https://secure.gravatar.com/avatar/4a2e0b7d905b4a7841e489e9f100eb50?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"Poita"},"body":"\r\nThis pull request is required after https://github.com/D-Programming-Language/dmd/pull/163 is merged in.\r\n\r\nCurrently, in a few places in druntime, modules do private selective imports, which (due to bug 314) causes private symbols to be imported by other files, which in turn causes access protection errors (revealed by my other pull request).\r\n\r\nExample:\r\ncore.runtime privately and selectively imports core.stdc.stdlib.free and core.stdc.string.strlen. Due to bug 314, this causes free and strlen to become private symbols of core.runtime, rather than imported symbols.\r\n\r\nNow, core.sys.windows.stracktrace imports core.runtime (as well as stdc.stdlib and stdc.string), which causes the private symbols free and strlen to be imported. When stacktrace tries to use free and strlen unqualified, you get an access error because they are private.\r\n\r\nThis change explicitly qualifies the calls to free and strlen so that it doesn't use the private ones unexpectedly (and erroneously) imported from core.runtime.\r\n\r\nBug 314: http://d.puremagic.com/issues/show_bug.cgi?id=314\r\n\r\nJust to be clear, this pull request does not fix bug 314, or any other reported bug for that matter. It simply works around some things caused by bug 314 that were revealed after implementing module level protection. The link is simply for convenience.\r\n\r\nNote: Sorry for re-creating this pull request. I messed up the history on the other one and didn't know how to fix it.\r\n","assignee":null,"id":2394292,"number":94,"labels":[],"pull_request":{"patch_url":"https://github.com/D-Programming-Language/druntime/pull/94.patch","html_url":"https://github.com/D-Programming-Language/druntime/pull/94","diff_url":"https://github.com/D-Programming-Language/druntime/pull/94.diff"},"title":"Fix access errors due to private imported symbols.","closed_at":null,"html_url":"https://github.com/D-Programming-Language/druntime/issues/94","url":"https://api.github.com/repos/D-Programming-Language/druntime/issues/94","milestone":null},"action":"created","comment":{"created_at":"2011-12-02T16:59:43Z","updated_at":"2011-12-02T16:59:43Z","user":{"gravatar_id":"74bb55d743fc9de242fbf29d6ae8cf37","id":566521,"url":"https://api.github.com/users/complexmath","avatar_url":"https://secure.gravatar.com/avatar/74bb55d743fc9de242fbf29d6ae8cf37?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"complexmath"},"body":"druntime probably shouldn't use selective imports with this bug, or at least not in any published module.  Perhaps we should just change that instead?","id":2992668,"url":"https://api.github.com/repos/D-Programming-Language/druntime/issues/comments/2992668"}}