Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Conversation

Poita
Copy link
Contributor

@Poita Poita commented Jun 25, 2011

This pull request is required after dlang/dmd#163 is merged in.

Currently, 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).

Example:
core.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.

Now, 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.

This 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.

Bug 314: http://d.puremagic.com/issues/show_bug.cgi?id=314

(Edit) : Just 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.

@dnadlinger
Copy link
Contributor

You might want to merge (e.g. using git rebase -i) the last commit into the previous one, because this way, it actually adds more clutter to the history than it removes. :)

@Poita Poita closed this Nov 29, 2011
dnadlinger pushed a commit to dnadlinger/druntime that referenced this pull request Sep 2, 2015
Cherry-pick upstream support for Visual Studio 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants