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

Remove static variable #841

Merged
merged 1 commit into from
Feb 12, 2020
Merged

Remove static variable #841

merged 1 commit into from
Feb 12, 2020

Conversation

leonardt
Copy link
Collaborator

This fixes StanfordAHA/garnet#428

I'm not exactly sure what the issue is, but I suspect it's related to the fact that a static member is being used in static linking context. Using gdb backtrace lead me to this as the source of the double free, and changing it to use normal non-static logic resolves the issue, although we should probably update all the passes to use the same form (I'm not sure why it only happens with this one, and/or whether it will resolve the issue for others).

@rsetaluri
Copy link
Collaborator

That's weird...wonder if it https://stackoverflow.com/questions/6714046/c-linux-double-destruction-of-static-variable-linking-symbols-overlap get's at the heart of it, i.e. it's linked statically and dynamically simultaneously somewhere

@leonardt
Copy link
Collaborator Author

@rsetaluri That's my theory, particularly because CoreIR is combining a statically link libcoreir with dynamically loaded libraries like commonlib

@rdaly525 rdaly525 merged commit 64bbc44 into master Feb 12, 2020
@rdaly525 rdaly525 deleted the fix-double-free branch February 12, 2020 17:44
@rdaly525 rdaly525 restored the fix-double-free branch February 12, 2020 17:44
@rdaly525
Copy link
Owner

Ill keep the branch around for now in case anyone is still using it

@rsetaluri
Copy link
Collaborator

@leonardt @rdaly525 if this unblocks people so be it, but we should definitely fix the real source of this issue, not just get rid of static's

@leonardt leonardt mentioned this pull request Jun 30, 2020
@rdaly525 rdaly525 deleted the fix-double-free branch January 20, 2021 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

coreir core dump during mem tile generation
3 participants