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

invalid debug info types passed to LLVM sometimes #761

Closed
andrewrk opened this issue Feb 9, 2018 · 1 comment · Fixed by #2135
Closed

invalid debug info types passed to LLVM sometimes #761

andrewrk opened this issue Feb 9, 2018 · 1 comment · Fixed by #2135
Labels
stage1 The process of building from source via WebAssembly and the C backend.
Milestone

Comments

@andrewrk
Copy link
Member

andrewrk commented Feb 9, 2018

Right now we do ZigLLVMReplaceCompositeType for the DIType of error sets, which means that we have to replace all references to it before we actually use it. Right now we put all the references in an array and then iterate later over this and do the replacements. It's pretty easy to mess up, and there are a few places, involving 0 bit types, where we make copies of the DIType and forget to append to this array.

So a better solution is to make the DIType of types indirect, so that we can replace them and simultaneously update all references.

Search codebase for g->error_di_types.append(&entry->di_type);

Actual best solution, but which requires a lot of rewriting, is not resolving debug info types until after analysis. We'll do this in the self hosted compiler at least, potentially doing the rewrite on the c++ compiler later.

@andrewrk andrewrk added the bug Observed behavior contradicts documented or intended behavior label Feb 9, 2018
@andrewrk andrewrk added this to the 0.2.0 milestone Feb 9, 2018
@andrewrk andrewrk modified the milestones: 0.2.0, 0.3.0 Mar 7, 2018
@andrewrk
Copy link
Member Author

This isn't really a bug, it's a design flaw that can be fixed with some code reworking.

@andrewrk andrewrk modified the milestones: 0.3.0, 0.4.0 Aug 27, 2018
@andrewrk andrewrk added stage1 The process of building from source via WebAssembly and the C backend. and removed bug Observed behavior contradicts documented or intended behavior labels Aug 27, 2018
@andrewrk andrewrk modified the milestones: 0.4.0, 0.5.0 Mar 14, 2019
andrewrk added a commit that referenced this issue Mar 29, 2019
Not tested yet, but it builds.

This closes #761, and lays the groundwork for fixing the remaining
false positive "foo depends on itself" bugs, such as #624.

It also lays the groundwork for implementing ability to specify
alignment of fields (#1512).
andrewrk added a commit that referenced this issue Apr 2, 2019
Not tested yet, but it builds.

This closes #761, and lays the groundwork for fixing the remaining
false positive "foo depends on itself" bugs, such as #624.

It also lays the groundwork for implementing ability to specify
alignment of fields (#1512).
@andrewrk andrewrk modified the milestones: 0.5.0, 0.4.0 Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage1 The process of building from source via WebAssembly and the C backend.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant