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

memory leak when using GPA allocator #181

Open
krichprollsch opened this issue Jan 16, 2024 · 0 comments
Open

memory leak when using GPA allocator #181

krichprollsch opened this issue Jan 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@krichprollsch
Copy link
Member

krichprollsch commented Jan 16, 2024

A memory leak exists when using the GPA allocator.

error(gpa): memory address 0x7f345b03c020 leaked: 
/home/pierre/wrk/browsercore/vendor/jsruntime-lib/src/engines/v8/generate.zig:531:39: 0xbe23e4 in setNativeObject__anon_148352 (browsercore-get)
        nat_obj_ptr = try alloc.create(T);                                                                       
                                      ^                                                                          
/home/pierre/wrk/browsercore/vendor/jsruntime-lib/src/engines/v8/v8.zig:371:39: 0xb7a7ca in createJSObject__anon_144659 (browsercore-get)
    const js_obj = try setNativeObject(                                                                          
                                      ^                                                                          
/home/pierre/wrk/browsercore/vendor/jsruntime-lib/src/engines/v8/v8.zig:234:30: 0xb37631 in addObject__anon_143473 (browsercore-get)
        return createJSObject(                                                                                   
                             ^
/home/pierre/wrk/browsercore/src/browser/browser.zig:218:39: 0xb30f29 in loadHTMLDoc__anon_143460 (browsercore-get)
        try self.session.env.addObject(self.session.window, "window");                                                                                                                                                           
                                      ^
/home/pierre/wrk/browsercore/src/browser/browser.zig:177:33: 0xb38489 in navigate (browsercore-get)                                                                                                                              
            try self.loadHTMLDoc(req.reader(), mime.charset orelse "utf-8");                                                                                                                                                     
                                ^
/home/pierre/wrk/browsercore/src/main_get.zig:68:22: 0xb3c2e3 in main (browsercore-get)                                                                                                                                          
    try page.navigate(url);                             
                     ^                                  

error(gpa): memory address 0x7f345b03c040 leaked: 
/home/pierre/wrk/browsercore/vendor/jsruntime-lib/src/engines/v8/generate.zig:531:39: 0xbe23e4 in setNativeObject__anon_148352 (browsercore-get)
        nat_obj_ptr = try alloc.create(T);
                                      ^
/home/pierre/wrk/browsercore/vendor/jsruntime-lib/src/engines/v8/v8.zig:371:39: 0xb7a7ca in createJSObject__anon_144659 (browsercore-get)
    const js_obj = try setNativeObject(
                                      ^
/home/pierre/wrk/browsercore/vendor/jsruntime-lib/src/engines/v8/v8.zig:234:30: 0xb37631 in addObject__anon_143473 (browsercore-get)
        return createJSObject(
                             ^
/home/pierre/wrk/browsercore/src/browser/browser.zig:219:39: 0xb30fc6 in loadHTMLDoc__anon_143460 (browsercore-get)
        try self.session.env.addObject(self.session.window, "self");                                                                                                                                                             
                                      ^
/home/pierre/wrk/browsercore/src/browser/browser.zig:177:33: 0xb38489 in navigate (browsercore-get)                                                                                                                              
            try self.loadHTMLDoc(req.reader(), mime.charset orelse "utf-8");                                                                                                                                                     
                                ^
/home/pierre/wrk/browsercore/src/main_get.zig:68:22: 0xb3c2e3 in main (browsercore-get)                                                                                                                                          
    try page.navigate(url);                             
                     ^                                  

warning: leaks detected
@krichprollsch krichprollsch added the bug Something isn't working label Jan 16, 2024
@krichprollsch krichprollsch changed the title memory leak memory leak when using GPA allocator Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant