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

Compiles normally on Linux but generates core files when running #98

Open
OxesDozen opened this issue Jun 14, 2022 · 0 comments
Open

Compiles normally on Linux but generates core files when running #98

OxesDozen opened this issue Jun 14, 2022 · 0 comments

Comments

@OxesDozen
Copy link

I have tried compiling and running this program on a Windows system and it worked fine. When I try to compile and run on a Linux system, it compiles fine, but the core file appears when I run it.

After analysis, I think the problem is in the emplace_back() function. In the Windows environment, the emplace_back() function refers to the _M_realloc_insert() function; but in the Linux environment, the same location is replaced by the _M_emplace_back_aux() function.

I'm new to programming and don't understand why such a difference would cause the software to fail, and I'm hoping for an answer. If I want to run this program in Linux environment, how can I modify the main function?

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

No branches or pull requests

1 participant