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

support for global C initializers #1171

Closed
elichai opened this issue Feb 11, 2020 · 1 comment
Closed

support for global C initializers #1171

elichai opened this issue Feb 11, 2020 · 1 comment
Labels
A-interpreter Area: affects the core interpreter A-shims Area: This affects the external function shims C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement

Comments

@elichai
Copy link
Contributor

elichai commented Feb 11, 2020

Hi,
I'm not sure if rust even officially supports this (maybe should open an unsafe-guideline discussion?)
but basically you can initialize arrays by linking into the right place in elf/exe etc but miri doesn't run this
https://play.rust-lang.org/?gist=04058d55590a58168f916a0e273add42

FWIW c2rust uses this to initialize global statics.

@RalfJung
Copy link
Member

I think this is a duplicate of #450 ?

@RalfJung RalfJung added A-interpreter Area: affects the core interpreter A-shims Area: This affects the external function shims C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement labels Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-interpreter Area: affects the core interpreter A-shims Area: This affects the external function shims C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement
Projects
None yet
Development

No branches or pull requests

2 participants