Menu

#154 Memory Leak in read.c:1738

fig2dev
closed
nobody
None
2024-12-30
2023-05-24
suyee
No

Here is a Memory Leak in read.c in commit 582968ea
Command:
./fig2dev -L gbx ./poc.txt

Asan output:

=================================================================
==366705==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 1 byte(s) in 1 object(s) allocated from:
    #0 0x4c4b17 in __interceptor_malloc /home/llvm-project-llvmorg-13.0.0/compiler-rt/lib/asan/asan_malloc_linux.cpp:129:3
    #1 0x52435e in attach_comments /home/afl-fig2dev/fig2dev/read.c:1738:18

SUMMARY: AddressSanitizer: 1 byte(s) leaked in 1 allocation(s).
1 Attachments

Discussion

  • tkl

    tkl - 2023-05-28

    I could not reproduce the issue, using llvm 15.0.7.

     
  • Roland Rosenfeld

    I did some bisecting and found out, that the segfault was fixed with

    commit f35ead0ea199c8920aaa3c483f42d760d7a32fcf (HEAD)
    Author: Thomas Loimer thomas.loimer@tuwien.ac.at
    Date: Fri May 19 18:33:24 2023 +0200

    Refactor sanitizing line objects, fixes ticket #152
    
    A box object with three corners caused an invalid memory access.
    Such a box is now closed and converted to a polygon.
    

    on my system.

     
  • tkl

    tkl - 2023-05-30

    Sorry, now I was able to reproduce, compiling with gcc,
    ./configure CFLAGS="-O0 -fsanitize=address -fsanitize=undefined -ggdb". I thought that I had tried both gcc and clang, on two systems, but obviously not correctly.

     
  • tkl

    tkl - 2024-12-30
    • status: open --> pending
     
  • tkl

    tkl - 2024-12-30

    Seems to be fixed.

     
  • tkl

    tkl - 2024-12-30
    • Status: pending --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.