Bug 103480 - blorp memory leak
Summary: blorp memory leak
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Tapani Pälli
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: mesa-17.3
  Show dependency treegraph
 
Reported: 2017-10-27 11:43 UTC by Tapani Pälli
Modified: 2017-10-30 06:25 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
hopeful fix (674 bytes, patch)
2017-10-27 11:45 UTC, Tapani Pälli
Details | Splinter Review
hopeful fix (2.05 KB, patch)
2017-10-27 12:06 UTC, Tapani Pälli
Details | Splinter Review

Description Tapani Pälli 2017-10-27 11:43:41 UTC
==6164== 48 bytes in 1 blocks are definitely lost in loss record 61 of 193
==6164==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==6164==    by 0x12E31C6C: ralloc_size (ralloc.c:121)
==6164==    by 0x130189F1: fs_visitor::assign_constant_locations() (brw_fs.cpp:2095)
==6164==    by 0x13022D32: fs_visitor::optimize() (brw_fs.cpp:5715)
==6164==    by 0x13024D5A: fs_visitor::run_fs(bool, bool) (brw_fs.cpp:6229)
==6164==    by 0x1302549A: brw_compile_fs (brw_fs.cpp:6570)
==6164==    by 0x130C4B07: blorp_compile_fs (blorp.c:194)
==6164==    by 0x130D384B: blorp_params_get_clear_kernel (blorp_clear.c:79)
==6164==    by 0x130D3C56: blorp_fast_clear (blorp_clear.c:332)
==6164==    by 0x12EFA439: do_single_blorp_clear (brw_blorp.c:1261)
==6164==    by 0x12EFC4AF: brw_blorp_clear_color (brw_blorp.c:1326)
==6164==    by 0x12EFF72B: brw_clear (brw_clear.c:297)


bisected to:
---- 8< ----
commit 8d90e2883954eb7022cf8fc98be3773cc5513e7b (HEAD -> history2)
Author: Jason Ekstrand <jason.ekstrand@intel.com>
Date:   Fri Sep 29 11:30:25 2017 -0700

    intel/compiler: Allocate pull_param in assign_constant_locations
Comment 1 Tapani Pälli 2017-10-27 11:45:40 UTC
Created attachment 135100 [details] [review]
hopeful fix

use mem_ctx for allocating stage_prog_data->param
Comment 2 Tapani Pälli 2017-10-27 12:06:51 UTC
Created attachment 135101 [details] [review]
hopeful fix
Comment 3 Tapani Pälli 2017-10-30 06:25:11 UTC
pushed the fix

commit 446c5726ecb968d06a6607e0df42be1cb74948c4
Author: Tapani Pälli <tapani.palli@intel.com>
Date:   Fri Oct 27 14:49:40 2017 +0300

    i965: fix blorp stage_prog_data->param leak
    
    Patch uses mem_ctx for allocation to ensure param array gets freed
    later.
    
    ==6164== 48 bytes in 1 blocks are definitely lost in loss record 61 of 193
    ==6164==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
    ==6164==    by 0x12E31C6C: ralloc_size (ralloc.c:121)
    ==6164==    by 0x130189F1: fs_visitor::assign_constant_locations() (brw_fs.cpp:2095)
    ==6164==    by 0x13022D32: fs_visitor::optimize() (brw_fs.cpp:5715)
    ==6164==    by 0x13024D5A: fs_visitor::run_fs(bool, bool) (brw_fs.cpp:6229)
    ==6164==    by 0x1302549A: brw_compile_fs (brw_fs.cpp:6570)
    ==6164==    by 0x130C4B07: blorp_compile_fs (blorp.c:194)
    ==6164==    by 0x130D384B: blorp_params_get_clear_kernel (blorp_clear.c:79)
    ==6164==    by 0x130D3C56: blorp_fast_clear (blorp_clear.c:332)
    ==6164==    by 0x12EFA439: do_single_blorp_clear (brw_blorp.c:1261)
    ==6164==    by 0x12EFC4AF: brw_blorp_clear_color (brw_blorp.c:1326)
    ==6164==    by 0x12EFF72B: brw_clear (brw_clear.c:297)
    
    Fixes: 8d90e28839 ("intel/compiler: Allocate pull_param in assign_constant_locations")
    Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
    Cc: mesa-stable@lists.freedesktop.org


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.