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

global object may cause double free or corruption #50

Open
demon90s opened this issue Sep 4, 2023 · 0 comments
Open

global object may cause double free or corruption #50

demon90s opened this issue Sep 4, 2023 · 0 comments

Comments

@demon90s
Copy link

demon90s commented Sep 4, 2023

If we add some global object like "std::vectorstd::string v = { "1", "2", "3" };" in our cpp file, which will be compiled later at runtime. Now we reload the project, everything is ok.

Then, our program exit normally(not by signal), it will be crashed with some message like:

*** Error in `./main': double free or corruption (fasttop): 0x00000000019aeac0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x81329)[0x7ff37cb07329]
/root/jet-live_test/build/lib_reload1.so(_ZN9__gnu_cxx13new_allocatorISsE10deallocateEPSsm+0x20)[0xc269f0]
/root/jet-live_test/build/lib_reload1.so(_ZNSt16allocator_traitsISaISsEE10deallocateERS0_PSsm+0x2b)[0xc268db]
.....

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