Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native function link name isn't used #905

Closed
brson opened this issue Sep 12, 2011 · 6 comments
Closed

Native function link name isn't used #905

brson opened this issue Sep 12, 2011 · 6 comments
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@brson
Copy link
Contributor

brson commented Sep 12, 2011

Native functions may specify an optional 'link name', which is intended to be the actual native name of the function:

    fn close(fd: int) -> int = "_close";

The compiler doesn't appear to actually do anything with this information, just generating a call to close as if the link name wasn't there.

@lht
Copy link
Contributor

lht commented Nov 14, 2011

Hi, please review this. I am working on #906, which will be applied on this one.

@lht
Copy link
Contributor

lht commented Nov 14, 2011

Sorry, please hold. I cannot reproduce the reported issue after rebasing to the latest master.

@lht
Copy link
Contributor

lht commented Nov 14, 2011

7aaeb3f should be the correct one. (Sorry for the mess. Maybe I'm having too much local work trees.)

@brson
Copy link
Contributor Author

brson commented Nov 14, 2011

Added comments to that commit about invalid memory access in the test case.

lht added a commit to lht/rust that referenced this issue Nov 15, 2011
@lht
Copy link
Contributor

lht commented Nov 15, 2011

Thanks Brian! Commit eae478c fixes the accessing invalid memory bug. And changes the test case to be something that makes sense.

@brson
Copy link
Contributor Author

brson commented Nov 15, 2011

Merged.

@brson brson closed this as completed Nov 15, 2011
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
coastalwhite pushed a commit to coastalwhite/rust that referenced this issue Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

2 participants