Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
L
librsvg
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 175
    • Issues 175
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 9
    • Merge Requests 9
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GNOME
  • librsvg
  • Issues
  • #325

Closed
Open
Opened Aug 28, 2018 by Benedikt Heine@bebeheiContributor

Memory leak full image when loading

When loading an SVG image via gdk_pixbuf_new_from_file, librsvg appears to leak the whole image a single time.

==6151== 2,955,993 (160 direct, 2,955,833 indirect) bytes in 10 blocks are definitely lost in loss record 514 of 514
==6151==    at 0x483877F: malloc (vg_replace_malloc.c:299)
==6151==    by 0x61B40E6: alloc (alloc.rs:62)
==6151==    by 0x61B40E6: exchange_malloc (alloc.rs:157)
==6151==    by 0x61B40E6: new<rsvg_internals::tree::Tree> (boxed.rs:96)
==6151==    by 0x61B40E6: rsvg_tree_new (tree.rs:39)
==6151==    by 0x61946F7: standard_element_start (rsvg-load.c:313)
==6151==    by 0x619550D: sax_start_element_cb (rsvg-load.c:636)
==6151==    by 0x6AEAC94: xmlParseStartTag (parser.c:8549)
==6151==    by 0x6AF2544: xmlParseTryOrFinish (parser.c:11345)
==6151==    by 0x6AF33DA: xmlParseChunk (parser.c:12244)
==6151==    by 0x619573F: write_impl (rsvg-load.c:980)
==6151==    by 0x486E28E: gdk_pixbuf__svg_image_load_increment (io-svg.c:133)
==6151==    by 0x48C7E40: generic_load_incrementally (gdk-pixbuf-io.c:991)
==6151==    by 0x48CC5A1: gdk_pixbuf_new_from_file (gdk-pixbuf-io.c:1090)
==6151==    by 0x109271: main (in /home/bebe/memleak-testproj/test)

According to my research, this isn't a problem in 2.42, but in 2.44.

I've created a new testproject to have an easy reproducer: https://gitlab.gnome.org/bebehei/memleak-testproj

Related: https://github.com/dunst-project/dunst/issues/538

Edited Aug 28, 2018 by Federico Mena Quintero
Assignee
Assign to
2.44.2
Milestone
2.44.2
Assign milestone
Time tracking
None
Due date
None
Reference: GNOME/librsvg#325